Android-Debug-Database icon indicating copy to clipboard operation
Android-Debug-Database copied to clipboard

when the value of primary key is larger than 9007199254740992,then can not delete or update the target row by primary key

Open light-wind opened this issue 4 years ago • 0 comments

In Java, you have 64 bits integers, and that's what you're using.

In JavaScript, all numbers are 64 bits floating point numbers. This means you can't represent in JavaScript all the Java longs. The size of the mantissa is about 53 bits, which means that your number,such as 793548328091516928, can't be exactly represented as a JavaScript number.

If you really need to deal with such numbers, you have to represent them in another way. This could be a string, or a specific representation like a digit array. Some "big numbers" libraries are available in JavaScript.

light-wind avatar Aug 09 '19 13:08 light-wind