[Bug?] Drizzle generates a broken query when passing an explicit value for a column as `undefined`

I've translated most of my logic from Prisma usage -> Drizzle. Noticed an issue where when explicitly passing attributes as undefined while inserting, drizzle generates a SQL query like:
sql .... SET exampleProperty = ,
sql .... SET exampleProperty = ,
which throws a syntax error during runtime
5 Replies
alexblokh
alexblokh2y ago
hey, which dialect?
rushil1o1
rushil1o1OP2y ago
postgres Its a strange behavior because the attribute is nullable, so I'd assume drizzle to automatically understand that and just not include it in the SET query. FYI: further context, not including the attribute in the set() call works; explicitly setting it as undefined doesn't work -- throws the error above @alexblokh
Dan
Dan2y ago
Sounds like a bug
rushil1o1
rushil1o1OP2y ago
appreciate it!!
Want results from more Discord servers?
Add your server