Limit
limit
Method Documentation
The limit
method specifies the sorting order for query results. It supports single columns, multiple columns, and key-value pairs with optional sorting directions (asc
or desc
).
Note:
After finishing building your query attach .build()
to generate it.
Method Signature
limit(value: number): this;
value
: The number of records to limit the query to. This must be a positive integer.
Return Type
this
: The method returns the current instance, allowing for method chaining.
Usage Example
query.limit(10);
Summary of Generated Query
Usage Format | Generated Query | Description |
---|---|---|
query.limit(10) | ?limit=10 | Limits the results to 10 records |