-
Notifications
You must be signed in to change notification settings - Fork 22
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
Conversation
9f2d53e
to
69afcc7
Compare
🎉 |
There was a problem hiding this 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']; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
7705ed5
to
150f826
Compare
150f826
to
1f376ed
Compare
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').