-
Notifications
You must be signed in to change notification settings - Fork 106
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
Inconsistent processing of large numbers from other languages. #147
Comments
True, we currently return raw Number values for integer and double values. (Lines for reference: nodejs-datastore/src/entity.js Lines 270 to 276 in 357839b
We should probably return our custom types, @JustinBeckwith any thoughts on if we should make this breaking change? I believe breaking changes don't scare us anymore? |
Yeah I have already published a npm package just for us that uses the But from our side, break away with the changes! Claim it in the name of progress ;) |
I kind of think we should take a similar approach to whats being suggested in googleapis/nodejs-bigquery#6, essentially allowing a user to specify custom types to cast to. This has the added benefit of not being breaking. @stephenplusplus @bcoe @JustinBeckwith thoughts? |
@callmehiphop I very much like the idea of a consistent approach between the two libraries 👍 |
@callmehiphop could I ask you take this one on? |
Because javascript cannot process large numbers, it becomes extremely difficult to work with integrated systems.
We have Java applications storing large
long
values to Datastore, which now has a typeInteger
in Datastore. These are then unable to be read by systems using node.While the node version can also STORE large values by using the
datastore.int()
method, when reading the value out of the database, it is automatically read as anumber
javascript type, and therefore truncated.The text was updated successfully, but these errors were encountered: