Back to Drizzle Orm

Transactions support 🎉

changelogs/drizzle-orm/0.23.9.md

0.45.2595 B
Original Source

Transactions support 🎉

You can now use transactions with all the supported databases and drivers.

node-postgres example:

ts
await db.transaction(async (tx) => {
  await tx.insert(users).values(newUser);
  await tx.update(users).set({ name: 'Mr. Dan' }).where(eq(users.name, 'Dan'));
  await tx.delete(users).where(eq(users.name, 'Dan'));
});

For more information, see transactions docs: