pgsql icon indicating copy to clipboard operation
pgsql copied to clipboard

Feature request: Allow a way to hook in to encoding/decoding for custom behaviour

Open devinus opened this issue 12 years ago • 3 comments

For example,

Decoding null to undefined when decoding from Postgres and encoding undefined to null.

devinus avatar Mar 08 '13 16:03 devinus

What would be the API for that feature?

pguyot avatar Mar 20 '13 08:03 pguyot

@pguyot In JSX you can pass a pre_encode and post_decode function to the encoder/decoder for custom behaviour. I imagine similar callbacks could be passed in the list of options to simple_query/extended_query

devinus avatar Mar 20 '13 08:03 devinus

QueryOptions are now (4980e69) passed quite deeply in simple/extended execution paths and could be used for this feature.

pguyot avatar Apr 28 '17 08:04 pguyot