-
Notifications
You must be signed in to change notification settings - Fork 106
fix(cursor): do not truncate an existing Long #441
Conversation
@jasontho-ms are you sure this is necessary? I just ran the following in the terminal and it seems okay. const bson = require('bson');
const assert = require('assert');
assert.ok(bson.Long.fromNumber(bson.Long.MAX_VALUE).equals(bson.Long.MAX_VALUE)) |
MAX_VALUE has no low bits so it works, but try it with one less than MAX_VALUE so it has low bits:
|
@jasontho-ms Ah, good point. |
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.
Thank you for this @jasontho-ms. As a heads up, we have merged mongodb-core
and node-mongodb-native
together for our next minor release. I can take care of porting this over to the new version, but you will lose credit for the commit. Do you want to take care of making this PR against the next
branch of node-mongodb-native
, or would you like me to take care of it. Let me know which works best.
- Dan
Merged. Thank you for the contribution @jasontho-ms! |
Port of mongodb-js/mongodb-core#441 to native.
Port of mongodb-js/mongodb-core#441 to native.
Port of mongodb-js/mongodb-core#441 to native.
This is a fix for issue #440