Iterates over all documents.
Iterates over all documents.
See Model#findById.
Iterates over all documents.
See Model#findById.
Iterates over all documents.
See Model#findById.
Iterates over all documents.
See Model#findById.
Finds a document by its identifier.
Finds a document by its identifier.
Finds a document by its identifier.
Finds a document by its identifier.
Finds a document by its identifier.
Model name
Returns the number of elements.
Returns the number of elements.
Deletes a model.
Returns the document at the specified index. num
can be a positive or
negative number.
See Model#findById.
Returns the document at the specified index. num
can be a positive or
negative number.
See Model#findById.
Returns the document at the specified index. num
can be a positive or
negative number.
See Model#findById.
Returns the document at the specified index. num
can be a positive or
negative number.
See Model#findById.
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.
Returns the first document.
See Model#findById.
Returns the first document.
See Model#findById.
Returns the first document.
See Model#findById.
Returns the first document.
See Model#findById.
Iterates over all documents.
See Model#findById.
Iterates over all documents.
See Model#findById.
Iterates over all documents.
See Model#findById.
Iterates over all documents.
See Model#findById.
Checks if the model contains a document with the specified id.
Inserts a document.
Optional
callback: NodeJSLikeCallback<any>Returns the last document.
See Model#findById.
Returns the last document.
See Model#findById.
Returns the last document.
See Model#findById.
Returns the last document.
See Model#findById.
Removes matching documents.
Optional
callback: NodeJSLikeCallback<any>Finds a document by its identifier and remove it.
Optional
callback: NodeJSLikeCallback<any>Replaces matching documents.
Optional
callback: NodeJSLikeCallback<any>Finds a document by its identifier and replace it.
Optional
callback: NodeJSLikeCallback<any>Inserts the document if it does not exist; otherwise updates it.
Optional
callback: NodeJSLikeCallback<any>Sorts documents. See Query#sort.
Optional
order: number | "desc" | Record<string, any>Sorts documents. See Query#sort.
Returns an array containing all documents.
See Model#findById.
Returns an array containing all documents.
See Model#findById.
Returns an array containing all documents.
See Model#findById.
Returns an array containing all documents.
See Model#findById.
Updates matching documents.
Optional
callback: NodeJSLikeCallback<any>Finds a document by its identifier and update it.
Optional
callback: NodeJSLikeCallback<any>
Model constructor.