OptionalrunExecutes several statements against this shard in one round trip.
Optional. The provider adapters implement it over D1's native batch,
Drizzle's db.batch, or a single driver transaction. CollegeDB falls back
to sequential prepare().run() calls when a provider does not implement
it, so callers never need to check for it.
Named runBatch rather than batch on purpose: a raw D1Database is
structurally assignable to this contract, and D1 already has a batch
that takes prepared statements rather than SQL text. Reusing the name
would make env.DB stop satisfying SQLDatabase.
Statements execute in order and share one transaction per shard. There is no cross-shard atomicity: a routed batch spanning three shards is three independent transactions.
OptionalwithStarts a read session. A raw D1 binding already has this method, and that is how CollegeDB detects it.
The argument is first-primary, first-unconstrained or a bookmark string.
OptionalconstraintOrBookmark: stringOptionalatomicWhether SQLDatabase.runBatch rolls the whole group back when one statement fails.
Optional, and true only for an adapter whose rollback has been shown to
work. The journal cutover and the key lock refuse a shard that leaves it
unset with MIGRATION_NO_ATOMIC_BATCH, because a batch that leaves its early
statements behind would leave a tombstone beside a live row.
OptionalconsistencyWhich ReadConsistency modes this shard can honor.
Optional. The Postgres, MySQL, MariaDB, SQLite and Drizzle adapters report
primary and eventual and not session. A shard that leaves it unset is
read as supporting session only when it has SQLDatabase.withSession.
OptionaldialectWhich SQL dialect this shard speaks, so generated statements quote identifiers correctly.
Optional. The adapter factories set it; a raw binding passed straight to initialize leaves it unset, which is read as ANSI double quoting and is correct for D1 and SQLite.
Provider-agnostic SQL database contract.