September 2017
Intermediate to advanced
450 pages
11h 24m
English
Mongoose's query API provides some of the most powerful search tools available in MongoDB, and are available as chainable methods to any Mongoose model API query such as find, findOne, or where:
| Property | Example | Description |
| all | query.all('tags', ['person', 'place']); | Returns documents where the value of a field is an array that contains all the specified elements. |
| and | query.and([{ status: 'priority' }, { title: 'foobar' }]); | Performs a logical and operation on an array of expressions and returns the documents that match them. |
| batchSize | query.batchSize(100) | Sets the number of documents to be returned in each batch by MongoDB. Unlike limit, which sets the total number or results returned, batch is simply how the ... |
Read now
Unlock full access