LiquiFruit
DTDrizzle Team
•Created by LiquiFruit on 5/6/2024 in #help
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
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
?11 replies
DTDrizzle Team
•Created by LiquiFruit on 12/5/2023 in #help
Refactor transaction to batched expression
Im trying to refactor a transaction to a batched expression. I need help with basic sql concepts involving updating tables based on sub queries, and also drizzle syntax such as .
This is my current transaction to expire orders and release related stock:
19 replies