Creates a query to retrieve a list of events.
The queryEvents()
function builds a query to retrieve a list of events and returns a EventsQueryBuilder
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 EventsQueryBuilder
functions onto the query. EventsQueryBuilder
functions enable you to sort, filter, and control the results queryEvents()
returns.
queryEvents()
runs with these EventsQueryBuilder
defaults, which you can override:
The functions that are chained to queryEvents()
are applied in the order they're called. For example, if you apply ascending('title')
and then descending('status')
, the results are sorted first by the title
, and then, if there are multiple results with the same title
, the items are sorted by status
.
PROPERTY | SUPPORTED FILTERS & SORTING |
---|---|
_id | eq() ,ne() ,in() ,ascending() ,descending() |
dateAndTimeSettings.startDate | eq() ,ne() ,lt() ,le() ,gt() ,ge() ,in() ,ascending() ,descending() |
dateAndTimeSettings.endDate | eq() ,ne() ,lt() ,le() ,gt() ,ge() ,in() ,ascending() ,descending() |
title | eq() ,ne() ,in() ,ascending() ,descending() |
slug | eq() ,ne() ,in() ,ascending() ,descending() |
_createdDate | eq() ,ne() ,lt() ,le() ,gt() ,ge() ,in() ,ascending() ,descending() |
_updatedDate | eq() ,ne() ,lt() ,le() ,gt() ,ge() ,in() ,ascending() ,descending() |
status | eq() ,ne() ,in() |
registration.initialType | eq() |
userId | eq() ,ne() ,in() |
Optional fields.