Abstract
Abstract
_modelAbstract
_schemaReturns the number of elements.
Number
Finds matching documents.
Finds matching documents.
Limits the number of documents returned.
Skips the first elements.
Returns a plain JavaScript object.
Returns a plain JavaScript object.
Finds matching documents.
Limits the number of documents returned.
Skips the first elements.
Returns a plain JavaScript object.
Returns a plain JavaScript object.
Finds matching documents.
Limits the number of documents returned.
Skips the first elements.
Returns a plain JavaScript object.
Optional
lean?: undefinedReturns a plain JavaScript object.
Finds matching documents.
Limits the number of documents returned.
Skips the first elements.
Returns a plain JavaScript object.
Finds the first matching documents.
Finds the first matching documents.
Skips the first elements.
Returns a plain JavaScript object.
Returns a plain JavaScript object.
Finds the first matching documents.
Skips the first elements.
Returns a plain JavaScript object.
Returns a plain JavaScript object.
Finds the first matching documents.
Skips the first elements.
Returns a plain JavaScript object.
Optional
lean?: undefinedReturns a plain JavaScript object.
Finds the first matching documents.
Skips the first elements.
Returns a plain JavaScript object.
Remove all documents.
Optional
callback: NodeJSLikeCallback<any>Replace all documents.
Optional
callback: NodeJSLikeCallback<any>Sorts documents.
Example:
query.sort('date', -1);
query.sort({date: -1, title: 1});
query.sort('-date title');
If the order
equals to -1
or desc
, the data will be
returned in reversed order.
Optional
order: number | "desc" | Record<string, any>Sorts documents.
Example:
query.sort('date', -1);
query.sort({date: -1, title: 1});
query.sort('-date title');
If the order
equals to -1
or desc
, the data will be
returned in reversed order.
Sorts documents.
Example:
query.sort('date', -1);
query.sort({date: -1, title: 1});
query.sort('-date title');
If the order
equals to -1
or desc
, the data will be
returned in reversed order.
Update all documents.
Optional
callback: NodeJSLikeCallback<any>
Query constructor.