-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
insert() with typescript #6066
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: