Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add collation support #40

Merged
merged 1 commit into from Dec 13, 2019

Conversation

jsalvata
Copy link
Contributor

Add support for collations so we can, for example, sort in alphabeticall order with 'b' < 'C' (rather than MongoDB's default binary ordering which makes 'a' > 'Z').

@jsalvata jsalvata force-pushed the jordi/support-collations branch 3 times, most recently from 9f2d53e to 69afcc7 Compare December 10, 2019 20:15
test/cursor.js Show resolved Hide resolved
@skeggse
Copy link
Member

skeggse commented Dec 10, 2019

🎉

Copy link
Contributor

@wearhere wearhere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@@ -8,7 +8,7 @@ class Cursor extends Readable {

// Currently mongodb cursor options itcount, readPref, showDiskLoc are not implemented - and some other
// See https://docs.mongodb.com/manual/reference/method/js-cursor/
const operations = ['batchSize', 'hint', 'limit', 'maxTimeMS', 'max', 'min', 'skip', 'snapshot', 'sort']
const operations = ['batchSize', 'hint', 'limit', 'maxTimeMS', 'max', 'min', 'skip', 'snapshot', 'sort', 'collation'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we document this somewhere? Looks like https://github.com/mongoist/mongoist#cursor might list the other options here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good place to note that it's only supported on 3.4 and up too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@ghmeier ghmeier merged commit caf9371 into mongoist:master Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants