Search...
skipTo( )
Developer Preview
Refines a query that skips to a specific record
Description
The skipTo()
function refines a ServiceOptionsAndVariantssQueryBuilder
that point to a specific record. You can get the relevant cursor token from cursors
object in previous call's response.
Not relevant fot the first request.
Following requests use the cursor token and not a filter property
Syntax
function skipTo(cursor: string): ServiceOptionsAndVariantsListQueryBuilder
skipTo Parameters
NAME
TYPE
DESCRIPTION
cursor
Optional
string
A pointer to specific record
Returns
Return Type:
Was this helpful?
Perform a query and skip to next cursor
Copy Code
1import { serviceOptionsAndVariants } from 'wix-bookings.v2';23export async function myQueryFunction() {4 const results = await serviceOptionsAndVariants5 .queryServiceOptionsAndVariants()6 .find();78 const nextCursor = results.cursors.next;9 return serviceOptionsAndVariants10 .queryServiceOptionsAndVariants()11 .skipTo(nextCursor)12 .find();13}14
Perform a query and get
prev
from the resultCopy Code
1import { serviceOptionsAndVariants } from 'wix-bookings.v2';23export async function myQueryFunction() {4 const results =5 await serviceOptionsAndVariants.queryServiceOptionsAndVariants();6 const prevCursor = results.cursors.prev;7 return serviceOptionsAndVariants8 .queryServiceOptionsAndVariants()9 .skipTo(prev)10 .find();11}12