queryparameter
Query Filter
Query filter documents specify the conditions that determine which records to select for read, update, and delete operations.
You can use : expressions to specify the equality condition and query operator expressions.
$type Operator
All query parameters that start with “$” symbol include $go, $max, $sort, $fit, and $sip. Query parameter is below the Get function of X method, therefore query parameters must be used in the Get function. To manipulate, for instance:
$go
Jump to the record of the input number.
$max ( $max )
The size parameter specifies the size of the return collection in number.
By default, queries in X-Server return all fields in matching documents. To limit the amount of data that X-Server sends to applications, you can include a projection document to specify or restrict fields to return.
For example, set the amount of return data to 10:
$sort
sort data.
To retrieve documents in reverse insertion order, issue Get() along with the $sort method with the $natural parameter set to -1, and set to 1 is ascending, as shown in the following example:
$fit
Instead of listing the fields to return in the matching document, you can use a $fit array to exclude specific fields. The following example which only return and include some fields in this array parameter.
If you do not specify a $fit array, the Get() method returns all fields in the matching documents.
$sip
Sip is the process of automatically replacing the specified paths in the document with document(s) from other collection(s). We may reference a single document, multiple documents, plain object, multiple plain objects, or all objects returned from a query in other collections. Let's look at an example.
Pagination function
The pagination options can be set as follows:
For example, page size is 10 and go to the third page, set $go=$max x 3 = 30
Go to the tenth page: set $go=$max x 10 = 100
Query Efficiency
Use natural ordering to retrieve the most recently inserted elements from the collection efficiently.
Last updated