I receive numeric data on http NodeJs , they need to be added to the database.

The problem is that in one of the tables there is a field of type BIGINT UNSIGNED , that is, 64-bit and all bits for the value.

In JavaScript numbers are also 64 bit, but 52 bits are reserved for the value (the remaining bits are mantis and a sign) if a number arrives more than 52 bits - the lower bits are discarded without an error in the interpreter.

It turns out that customers send me some numbers and see others in the database. Is there any way around this limitation?

  • one
    as an option to send numbers as strings - diraria
  • one
    so now we go around the limitation, but it's a crutch. I’m not send lines when the numeric value is in the database - torokhkun
  • And how do they send them? - Alexey Ten
  • http package, post or put or patch depending on the context - torokhkun

1 answer 1

To solve this problem, you can use the modules:

  • Thanks, I study. Technically, this is probably the answer to the question ... But I would like to understand not how to solve this problem. And then I get the impression that we are not programming at the front but are combining. - torokhkun