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
this returns one of the Timestamps as is, so now we are working with a ColumnType instead of Date (the type in this example has __insert__, __select__ and __update__ properties)
I hope this is helpful, and thanks for the work that's been done here to make the Kysely experience better. I would love to commit a fix straight to the repo, but I'm not very experienced with this kind of stuff, only TypeScript. It'd be appreciated if a more experienced maintainer looks into the actual generation of such types.
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:
ShadowAya
changed the title
ColumnType falsely generated for pg listsColumnType falsely generated for pg lists
Nov 18, 2023
ShadowAya
changed the title
ColumnType falsely generated for pg listsColumnType incorrectly generated for pg lists
Nov 18, 2023
issue
I use Kysely with a PostgreSQL database. In one of my tables. I have a key of type
timestamp without time zone[]
.The generated type:
this puts a list of
Timestamp
s intotimestamps
, but from my knowledge, that is improper use ofColumnType
.what happens
When doing a query, the following happens:
this returns one of the
Timestamp
s as is, so now we are working with aColumnType
instead ofDate
(the type in this example has__insert__
,__select__
and__update__
properties)possible solution
I created a utility type for this:
I hope this is helpful, and thanks for the work that's been done here to make the Kysely experience better. I would love to commit a fix straight to the repo, but I'm not very experienced with this kind of stuff, only TypeScript. It'd be appreciated if a more experienced maintainer looks into the actual generation of such types.
Upvote & Fund
The text was updated successfully, but these errors were encountered: