Closed samwillis closed 1 month ago
Built bundles:
🚀 Deployed on https://66f306e52daefb16f4cefa04--pglite.netlify.app
Hey @alexgleason, could you take a look at this and see if it works with your app?
@samwillis My tests are passing with this branch. Thank you!! :+1:
This is based on #306 but additionally refactors much of the type handling. It also lays the foundation for users to add they own serialises and parser to a PGlite instance either directly or via a plugin/extension - this will come in a later PR.
In the old version type serialization was driven by inferring the type on the JS side, converting to a serialised string, and then setting the type OID on the query for each parameter.
This new version uses the "describe" protocol message to get the expected type of each parameter in a query, and then try and serialise the value based on that. This is based on how it's done in postgres.js