Skip to content

Offset

Skip number of found objects

Prefix: offset

Value: Modifier with a number

Can start the pipeline: No

Steps before: find, get, sort, limit, offset

Steps after: find, get, sort, limit, offset, update, delete

Example

Input:

collection|test|:q[
    find[
    ],
    sort[
        asc(value|num|),
    ],
    offset(n|5|),
];

Output:

result:ok[
    response{
        s|data|:objects{
            test|701f0bf2-e17f-4823-b410-83a418e035ca|:m{
                s|num|:n|5|,
                s|name|:s|test_5|,
            },
            test|9b14220b-209d-4b19-860d-cba7d99ec0b2|:m{
                s|num|:n|6|,
                s|name|:s|test_6|,
            },
            test|19d9133d-5291-40b2-8a92-d6892e693d12|:m{
                s|num|:n|7|,
                s|name|:s|test_7|,
            },
            test|8d6a06fb-670a-4f39-aa9e-3f613ed3c8a3|:m{
                s|name|:s|test_8|,
                s|num|:n|8|,
            },
            test|2fb8117b-e131-42af-b4a2-a4e525918b16|:m{
                s|name|:s|test_9|,
                s|num|:n|9|,
            },
        },
        s|meta|:find_meta{
            s|count|:n|5|,
        },
    },
];