Search...
skip( )
Sets the number of items to skip before returning query results.
Description
The number of items to skip in the query results before returning the results.
The skip()
function defines the number of results to skip in the query
results before returning new query results.
For example, if you query a collection and 50 items match your query, but
you set skip
to 10, the results returned will skip the first 10 items
that match and return the 11th through 50th items.
By default, skip
is set to 0.
Syntax
function skip(skip: string): GroupMembersQueryBuilder
skip Parameters
NAME
TYPE
DESCRIPTION
skip
string
The number of items to skip in the query results before returning the results.
Returns
A GroupMembersQueryBuilder
object representing the refined query.
Return Type:
Was this helpful?
Add a
skip` to a queryCopy Code
1const query = members.queryGroupMembers().skip(10);
Create a query, add a
skip
, and run itCopy Code
1import { Permissions, webMethod } from 'wix-web-module';2import { members } from 'wix-groups-backend';34export const myQueryGroupMembersFunction = webMethod(Permissions.Anyone, () => {5 return members.queryGroupMembers()6 .skip(10)7 .find()8 .then((results) => {9 if (results.items.length > 0) {10 const items = results.items;11 const firstItem = items[0];12 const pageSize = results.pageSize;13 const totalPages = results.totalPages;14 const totalCount = results.totalCount;15 const currentPage = results.currentPage();16 const next = results.next();17 const previous = results.prev();18 const hasNext = results.hasNext();19 const hasPrev = results.hasPrev();20 const length = results.length;2122 return items;23 } else {24 // Handle case where no matching items found25 }26 })27 .catch((error) => {28 console.error(error);29 })3031});