All queries inside each `batch` call are executed inside a single transaction: https://developers.cl

All queries inside each
batch
call are executed inside a single transaction: https://developers.cloudflare.com/d1/build-with-d1/d1-client-api/#batch-statements

Batched statements are SQL transactions ↗. If a statement in the sequence fails, then an error is returned for that specific statement, and it aborts or rolls back the entire sequence.
Was this page helpful?