Search.../

queryScheduleItems( )

Creates a query to retrieve a list of schedule items.

Description

The queryScheduleItems( ) function builds a query to retrieve a list of schedule items and returns a ItemsQueryBuilder object.

The returned object contains the query definition, which is typically used to run the query using the find() function.

You can refine the query by chaining ItemsQueryBuilder functions onto the query. ItemsQueryBuilder functions enable you to sort, filter, and control the results queryScheduleItems( ) returns.

queryScheduleItems( ) runs with these ItemsQueryBuilder defaults, which you can override:

The functions that are chained to queryScheduleItems( ) are applied in the order they're called. For example, if you apply ascending('name') and then descending('stageName'), the results are sorted first by the name, and then, if there are multiple results with the same name, the items are sorted by stageName.

PROPERTYSUPPORTED FILTERS & SORTING
_ideq(),ne(),ascending(),descending()
nameeq(),ne(),ascending(),descending()
descriptioneq(),ne(),ascending(),descending()
stageNameeq(),ne(),ascending(),descending()
_createdDateeq(),ne(),lt(),le(),gt(),ge(),ascending(),descending()
_updatedDateeq(),ne(),lt(),le(),gt(),ge(),ascending(),descending()
eventIdeq(),ne(),ascending(),descending()

Syntax

function queryScheduleItems(): ItemsQueryBuilder

queryScheduleItems Parameters

This function does not take any parameters.

Returns

Return Type:

Was this helpful?

queryScheduleItems example

Copy Code
1import { schedule } from 'wix-events.v2';
2
3 async function queryScheduleItems() {
4 const { items } = schedule.queryScheduleItems().find();
5 }
6