Initializes CollegeDB by discovering shard bindings from a Workers env.
On Cloudflare, D1 bindings live on env under conventional names
(DB_EAST, DB_WEST, ...). This scans env for those, resolves each with
toProvider (D1 / Drizzle / SQLite), wires the KV store (raw Workers
KV is auto-wrapped via createWorkersKVProvider), and calls
initialize. It removes the ~40-line hand-rolled wiring most Worker
apps otherwise write.
Shard names are the binding name lowercased with _ replaced by -
(DB_EAST -> db-east).
Initializes CollegeDB by discovering shard bindings from a Workers
env.On Cloudflare, D1 bindings live on
envunder conventional names (DB_EAST,DB_WEST, ...). This scansenvfor those, resolves each with toProvider (D1 / Drizzle / SQLite), wires the KV store (raw Workers KV is auto-wrapped via createWorkersKVProvider), and calls initialize. It removes the ~40-line hand-rolled wiring most Worker apps otherwise write.Shard names are the binding name lowercased with
_replaced by-(DB_EAST->db-east).