Transactions support 🎉
You can now use transactions with all the supported databases and drivers.
node-postgres
example:
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:
- PostgreSQL
- MySQL
- SQLite