Decoding Postgres numeric to JS number #414
|
Is there a particular reason that the Postgres data type of The postgres numeric does potentially hold a massive number with lots more precision than a JS number, but in most use cases wouldn't it be okay? https://github.com/denodrivers/postgres/blob/main/query/decode.ts#L74-L92 |
Replies: 3 comments
|
Im also interested in this. its not only numeric but also Floats (even float4 which technically fits in JS float) are all parsed as text |
|
After we stabilize the project dependencies, we'll look into how to enhance the experience to customize and give devs more controls over the transformations done to/from the DB, I too find myself overriding many of the hardcoded mappings for the DB data column types to JS types. |
|
A PR has been opened to allow devs to control this behavior #458 |
After we stabilize the project dependencies, we'll look into how to enhance the experience to customize and give devs more controls over the transformations done to/from the DB, I too find myself overriding many of the hardcoded mappings for the DB data column types to JS types.