Returning numeric fields as float
Hello, we're migrating from Supabase to Kysely and we have some queries failing in our client because it seems Kysely is returning columns marked as numeric in string format. How can one setup Kysely to parse those numeric columns to float ?
5 Replies
Kysely doesn't touch the output data in any way. You need to configure the driver or 3rd party dialect to do the transformations. See their documentation.
oooh ok gotcha, thanks
do you happen to kow by any chance how the postgres driver works and if there is any way to parse the int colums as numbers?
The
pg
driver?yes
GitHub
GitHub - brianc/node-pg-types: Type parsing for node-postgres
Type parsing for node-postgres. Contribute to brianc/node-pg-types development by creating an account on GitHub.