How to type a Table
I want my data access layer to depend on my entities layer. I want to define a ts type for an entity, say a Student type, and then implement a drizzle table that's based off that type. Something like
Is there a way to do this atm? Maybe a hack with
const studentTable = sqliteTable<Student>(...) would be perfect the syntax imo. I would expect this to throw errors if it was missing a field or incorrectly typed field.Is there a way to do this atm? Maybe a hack with
drizzle-zod?