Closed 0xOlias closed 1 week ago
@samwillis waiting on review. Please let me know if I can make this easier to review in any way, or if you have a different direction in mind than the one proposed here.
For what it's worth, our use case would be unblocked just by adding serializers
to QueryOptions - don't strictly need the instance-wide parsers/serializers.
Hey @0xOlias, apologies for the delay. I'll aim to take a proper look in the next couple of days. Massively appreciate you picking this up!
As a heads up, we unblocked ourselves by moving the parse/serialize logic to the query builder/ORM layer. Feel free to close, though I suspect others will ultimately want this.
This PR adds support for custom serializers to
QueryOptions
, and adds support for custom parsers and serializers toPGliteOptions
. The change is non-breaking.Our use case is using NUMERIC columns to store integers too large for BIGINT. We'd like these values to use the JS native BigInt rather than String, and it's easiest if this happens at the driver layer.
Verified locally in an integration test with our framework.