Add function to table in schema.ts
I come from a background using the Eloquent ORM in Laravel where you can add methods to the models so you can do something like
user.isAdmin()
(example with js syntax). Is it possible in Drizzle to add a function to the table so after I've queried a row I can do something similar like
or would i have to define helpers like
worth to note that in this example I would have a user_admins
table with a one-to-one reference to a User
not a is_admin
column on the users
table0 Replies