If I pass an object with a property that has 'undefined' as the value, will it be ignored?

If I am updating or inserting data and passing an object, for instance:
const dbData = {
id: undefined,
name: 'foo'
}
const dbData = {
id: undefined,
name: 'foo'
}
Will ID be ignored and not set?
2 Replies
Angelelz
Angelelz10mo ago
Yes, drizzle will actively ignore undefined values
Angelelz
Angelelz10mo ago
GitHub
drizzle-orm/drizzle-orm/src/utils.ts at main · drizzle-team/drizzle...
Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅 - drizzle-team/drizzle-orm
Want results from more Discord servers?
Add your server