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
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.
The text was updated successfully, but these errors were encountered:
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?
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 sayint id
is introspected toGenerated<number>
(we would like number type) ordecimals
are introspected toNumeric
(we would like just number). How this can be done in convenient way and is it possible?Upvote & Fund
The text was updated successfully, but these errors were encountered: