Add warning when inference used for Number types to Datastore types #759
Labels
api: datastore
Issues related to the googleapis/nodejs-datastore API.
help wanted
We'd love to have community involvement on this issue.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
As discussed in #754, the auto conversion to datastore types doesn't work particualrly well in Node.js. Numbers need to be coverted to int, double, but there are times it makes the wrong choice.
This functionality is planned to be removed in a future version as it is too easy for customers to do the wrong thing and end up with disparate types unexpectedly.
Example
Insert "3.0", "3.99", "4.99" expecting double, double, double. Actual is int, double, double, as 3.0 is an integer.
This issue tracks adding a warning in a fix release letting customers know that inference is being used and can be fragile, particularly if used for columns expected to be floats/doubles.
The text was updated successfully, but these errors were encountered: