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
Senbonzakura1234
changed the title
[BUG]: Incorrect type inference with multidimensional array field
[BUG]: Incorrect type inference with multidimensional array field PostgreSQL
Aug 12, 2023
@dankochetov maybe i was try to make drizzle return infer type [HyperLinkRecord, HyperLinkRecord][], but then it did not work and just return HyperLinkRecord[][]. It was quite long ago. Anyway leme test if mergeFrom: jsonb('merge_from').$type<HyperLinkRecord[][]>().notNull() also has this bug or not
@dankochetov maybe i was try to make drizzle return infer type [HyperLinkRecord, HyperLinkRecord][], but then it did not work and just return HyperLinkRecord[][]. It was quite long ago. Anyway leme test if mergeFrom: jsonb('merge_from').$type<HyperLinkRecord[][]>().notNull() also has this bug or not
@dankochetov as i test mergeFrom: jsonb('merge_from').$type<HyperLinkRecord[][]>().notNull() didn't produce wrong infer type
What version of
drizzle-orm
are you using?0.28.2
What version of
drizzle-kit
are you using?0.19.12
Describe the Bug
I have a PostgreSQL table with shape roughly like this:
Try update drizzle-orm@0.27.2 to drizzle-orm@0.28.2.
and the type of mergeFrom turn to
unknown[][]
The schema returned correct type with drizzle-orm@0.27.2 though
Expected behavior
type of
mergeFrom
properties should beHyperLinkRecord[][]
Environment & setup
full package.json of my project
The text was updated successfully, but these errors were encountered: