© 2026 Hedgehog Software, LLC
onConflictDoUpdate
const updated = await db .update(...) .set(...) .where(eq(..)) // If no rows updated, create new row if (updated[0].affectedRows === 0) { await db.insert(...).values(...) }