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
bloberenober
bloberenober15mo ago
No, I don't think it's possible with Drizzle alone
d4mr
d4mr8mo 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
ozan6mo ago
curious about this as well