How to define types for jsonb
How do you provide custom type interfaces for jsonb columns returned via queries.
for instance if i have a column:
i want to be able to define a type interface for
im aware of this page in the docs (https://orm.drizzle.team/docs/custom-types) but i think this is not actually for what im talking about but maybe im dumb
for instance if i have a column:
myfield: jsonb('data').notNull()i want to be able to define a type interface for
myfield such that when i do const { myfield } = await db.query.myTable.findFirst({}), the type of myfield is customized instead of unknownim aware of this page in the docs (https://orm.drizzle.team/docs/custom-types) but i think this is not actually for what im talking about but maybe im dumb
Drizzle ORM | %s