Skip to content

Commit e33a493

Browse files
committed
fix: improve documentation and skip commit
1 parent f4543f6 commit e33a493

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ Call `find()` with the following parameters:
5858
The default is to use the Mongo built-in '_id' field, which satisfies the above criteria.
5959
The only reason to NOT use the Mongo _id field is if you chose to implement your own ids.
6060
-sortAscending {Boolean} True to sort using paginatedField ascending (default is false - descending).
61+
-sortCaseInsensitive {boolean} Whether to ignore case when sorting, in which case `paginatedField`
62+
must be a string property.
6163
-next {String} The value to start querying the page.
6264
-previous {String} The value to start querying previous page.
6365
@param {Function} done Node errback style function.
@@ -327,7 +329,7 @@ If the `limit` parameter isn't passed, then this library will default to returni
327329
The collation to use for alphabetical sorting, both with `find` and `aggregate`, can be selected by setting `mongoPaging.config.COLLATION`. If this parameter is
328330
not set, no collation will be provided for the aggregation/cursor, which means that MongoDB will use whatever collation was set for the collection.
329331
330-
## Important note regarding collation
332+
## (!) Important note regarding collation (!)
331333
332334
If using a global collation setting, or a query with collation argument, ensure that your collections' indexes (that index upon string fields)
333335
have been created with the same collation option; if this isn't the case, your queries will be unable to

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"ci:commitlint": "commitlint-jenkins --pr-only",
1616
"lint": "eslint .",
1717
"prepublishOnly": "npm run babelBuild && if [ \"$CI\" = '' ]; then node -p 'JSON.parse(process.env.npm_package_config_manualPublishMessage)'; exit 1; fi",
18-
"semantic-release": "SEMANTIC_COMMITLINT_SKIP=5ed5489,e2ab709,187f1fe,0dcc73f,6d15fe5,7a05f30 semantic-release",
18+
"semantic-release": "SEMANTIC_COMMITLINT_SKIP=f4543f643bac890c627d538e6200c5f5a1d45ebc semantic-release",
1919
"test": "DRIVER=mongoist jest && DRIVER=native jest"
2020
},
2121
"repository": {

src/aggregate.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ const config = require('./config');
2525
* -paginatedField {String} The field name to query the range for. The field must be:
2626
* 1. Orderable. We must sort by this value. If duplicate values for paginatedField field
2727
* exist, the results will be secondarily ordered by the _id.
28-
* 2. Indexed. If the aggregation pipieline can return a large number of documents, this should
29-
* be indexed for query performance.
30-
* 3. Immutable. If the value changes between paged queries, it could appear twice.
28+
* 2. Immutable. If the value changes between paged queries, it could appear twice.
29+
* 3. Accessible. The field must be present in the aggregation's end result so the
30+
* aggregation steps added at the end of the pipeline to implement the paging can access it.
3131
* The default is to use the Mongo built-in '_id' field, which satisfies the above criteria.
3232
* The only reason to NOT use the Mongo _id field is if you chose to implement your own ids.
3333
* -sortAscending {boolean} Whether to sort in ascending order by the `paginatedField`.

0 commit comments

Comments
 (0)