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.
Closes the client held for the current request.
Call it once per request, typically as ctx.waitUntil(provider.dispose()).
Unnecessary when scope is configured.
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.
A Hyperdrive-backed provider plus the hook that releases its connection.
Since
1.4.0