type union on entire row

i can think of workarounds for this but figured i'd ask if i have a table that's like [id, type, data (json)] and i want a discriminated union based on type - is there a way to do this with drizzle? i was going to do my own fancy type stuff but though i'd ask first
3 Replies
Dan
Dan2y ago
No, I don't think it's possible with Drizzle alone
d4mr
d4mr11mo ago
did you end up doing fancy type stuff? Would be very helpful to learn from how you implemented this, I want to do this exact thing. (I would rather be using postgres table inheritance but drizzle doesn't support it)
ozan
ozan10mo ago
curious about this as well
Want results from more Discord servers?
Add your server