-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Is your feature request related to a problem? Please describe.
Currently, the deno-postgres driver is hardcoded to parse values to JS types wherever possible and return strings where the parsing/decoding is not implemented. There is no way to opt out of this behavior if developers want to handle parsing in their applications.
Describe the solution you'd like
Have a Client option that allows users to set the parse mode to string or auto
string: all values are returned as string, and the user has to take care of parsing
auto: deno-postgres parses the data into JS objects (as many as possible implemented Add missing postgres types mapping / decoders / parser #446, non-implemented parsers would still return strings)
Both modes are overridable with some API to pass custom parser per oid type, giving users complete power over how they want any data type to be parsed by the library. (#239)
Describe alternatives you've considered
Directly changing the package source code in my application to override the behavior.
Additional context
N/A