You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`[customLabels]` {Object} - Developers can provide custom labels for manipulating the response data.
93
-
-`[pagination]` {Boolean} - If `pagination` is set to false, it will return all docs without adding limit condition. (Default: True)
94
-
-`[useEstimatedCount]` {Boolean} - Enable [estimatedDocumentCount](https://docs.mongodb.com/manual/reference/method/db.collection.estimatedDocumentCount/) for larger datasets. Does not count based on given query, so the count will match entire collection size. (Default: False)
95
-
-`[useCustomCountFn]` {Boolean} - Enable custom function for count datasets. (Default: False)
96
-
-`[forceCountFn]` {Boolean} - Set this to true, if you need to support \$geo queries. (Default: False)
97
-
-`[allowDiskUse]` {Boolean} - Set this to true, which allows the MongoDB server to use more than 100 MB for query. This option can let you work around QueryExceededMemoryLimitNoDiskUseAllowed errors from the MongoDB server. (Default: False)
94
+
-`[pagination]` {Boolean} - If `pagination` is set to false, it will return all docs without adding limit condition. (Default: `True`)
95
+
-`[useEstimatedCount]` {Boolean} - Enable [estimatedDocumentCount](https://docs.mongodb.com/manual/reference/method/db.collection.estimatedDocumentCount/) for larger datasets. Does not count based on given query, so the count will match entire collection size. (Default: `False`)
96
+
-`[useCustomCountFn]` {Boolean} - Enable custom function for count datasets. (Default: `False`)
97
+
-`[forceCountFn]` {Boolean} - Set this to true, if you need to support \$geo queries. (Default: `False`)
98
+
-`[customFind]` {String} - Method name for the find method which called from Model object. This options can be used to change default behaviour for pagination in case of different use cases (like [mongoose-soft-delete](https://github.com/dsanel/mongoose-delete#method-overridden)). (Default `'find'`)
99
+
-`[allowDiskUse]` {Boolean} - Set this to true, which allows the MongoDB server to use more than 100 MB for query. This option can let you work around QueryExceededMemoryLimitNoDiskUseAllowed errors from the MongoDB server. (Default: `False`)
98
100
-`[read]` {Object} - Determines the MongoDB nodes from which to read. Below are the available options.
99
101
-`[pref]`: One of the listed preference options or aliases.
100
102
-`[tags]`: Optional tags for this query. (Must be used with `[pref]`)
101
103
-`[options]` {Object} - Options passed to Mongoose's `find()` function. [Documentation](https://mongoosejs.com/docs/api.html#query_Query-setOptions)
102
-
-`[customFind]` {String} - Method name for the find method which called from Model object. This options can be used to change default behaviour for pagination in case of different use cases (like [mongoose-soft-delete](https://github.com/dsanel/mongoose-delete#method-overridden)). (Default `'find'`)
104
+
103
105
-`[callback(err, result)]` - If specified, the callback is called once pagination results are retrieved or when an error has occurred
104
106
105
107
**Return value**
@@ -404,9 +406,9 @@ Model.paginate({}, options, function (err, result) {
404
406
405
407
Below are some references to understand more about preferences,
0 commit comments