You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm new to Knex, and using typescript, and the following works: knex.select().from<User>('tbl_user').first();
where Knex is able to map columns to the User interface.
I'm trying to do same with .insert() but a bunch of tries haven't worked out.
I've tried things like:
Hello,
I'm new to Knex, and using typescript, and the following works:
knex.select().from<User>('tbl_user').first();
where Knex is able to map columns to the User interface.
I'm trying to do same with
.insert()
but a bunch of tries haven't worked out.I've tried things like:
User has
firstName
and table hasfirst_name
. Searching other issues/docs and online. Can someone help/point me in the right direction?Thanks!
Edit: I suppose this would've worked: https://knexjs.org/guide/#postprocessresponse but ended up using https://github.com/Kequc/knex-stringcase
The text was updated successfully, but these errors were encountered: