Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
spiffytech
21d ago
0 comments
Save
Share
Fortunately we're seeing more JS DB libraries offering to read large numbers as the BigInt type.
0 comments
4 comments · 1 top-level
top
newest
oldest
shakna
21d ago
· 3 in thread
But frustratingly, a JS BigInt is nothing like a BigInt in any other language.
In JS - BigInt is 64bit integer.
In anything else - BigInt is a arbitrarily large integer.
anematode
21d ago
Hm? JavaScript BigInts are arbitrary precision, and you need to use methods like BigInt.asIntN(64, a) to convert them to 64 bits
mort96
20d ago
I hate this so much because you can’t nicely serialise a BigInt as JSON. Using a string is nicer but it
only
makes sense where int64 is used as an ID, not where it’s used as a number; and you don’t wanna have to configure this per field per query.
3 more replies
Etheryte
21d ago
This is simply not true? Or maybe I misunderstand what you mean?
j
/
k
navigate · click thread line to collapse