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
koskimas
koskimas17mo ago
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.
bombillazo
bombillazoOP17mo ago
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?
koskimas
koskimas17mo ago
The pg driver?
bombillazo
bombillazoOP17mo ago
yes
koskimas
koskimas17mo ago
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.

Did you find this page helpful?