If you mean interleaving JavaScript code
If you mean interleaving JavaScript code and SQL within the same transaction, then not at the moment. You can execute multiple SQL queries in a single transaction using the
batch()
function, though, if that fits your use-case.
Otherwise if you need a lot of JS mixed with SQL, using SQLite Durable Objects is more suitable.3 Replies
like im using drizzle orm with d1, i didn't find anything strong supporting transactions in this case,
Yeah, according to https://orm.drizzle.team/docs/transactions it seems that those interleave JS code with SQL, which you cannot do with D1.
Drizzle ORM - Transactions
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
understood