Skip to content
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

Is it possible to configure to which types database columns are introspected? #170

Open
tzezar opened this issue Jul 2, 2024 · 1 comment
Labels
question Further information is requested

Comments

@tzezar
Copy link

tzezar commented Jul 2, 2024

We use kysely-codegen and we would like to use those generated types later in the code fe. in mapping domain models to db, but they often are translated to diffrent types we want and we struggle with type conversions. One source of truth would be superior too. Lets say int id is introspected to Generated<number> (we would like number type) or decimals are introspected to Numeric (we would like just number). How this can be done in convenient way and is it possible?

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@bakasmarius
Copy link

I'm not entirely sure I understood your problem correctly, but I have a feeling it's the same one we had when we started using kysely and kysely-codegen.
Have you tried using Selectable, Insertable and Updateable wrappers as described here https://kysely.dev/docs/getting-started#types?

@RobinBlomberg RobinBlomberg added the question Further information is requested label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants