DT
Drizzle TeamNotLuksus
"Extend" tables by other tables
Hey all,
first of all great work with drizzle.
Haven't had the time to play around with it so far. But just from how I currently use other orms.
I have an AbstractEntity "class" which isn't an actual db table, but shares the common column each table should have e.g. a unique id.
Basically like a parent class, but for DB tables.
Is it possible to do something similar.
Without trying: Can I just create an object using the given types/constructors from drizzle and then spread them?
I hope that makes sense
I
icarus•407d ago
yea the table builders just take regular js objects for columns, so u can simply do something like this:
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.3KMembers
View on DiscordWant results from more Discord servers?
More Postsmaximum call stack exceededWeird bug where whenever I add a `where` `eq` clause getting maximum call stack exceededDrizzle recommended way to migrate resetApologies if this is a stupid question, I just recently migrated out of prisma and into drizzle. Onecompound uniqueIndexIn Prisma, I have in my schema definition the following declaration that requires userId and timestaplanetscale: how to index col using drizzle?Hi, seems most of the samples are pg. I'm using planetscale, and no having any luck figuring out how