Function: createServerDb()
Function: createServerDb()
Section titled “Function: createServerDb()”createServerDb<
S>(options):Db<S>
Defined in: server/src/server-db.ts:25
Build a Db bound to the SQL driver.
Change-log recording is automatic: every user table has AFTER INSERT /
UPDATE / DELETE triggers created by ensureSchema, so any write —
whether via this Db, via a raw drizzle instance, or via wrangler d1 execute — lands in the change log and reaches subscribing clients.
Server-side background jobs (scheduled(...)) should still prefer this
helper because it uses the same isomorphic DSL as your mutators.
Type Parameters
Section titled “Type Parameters”S extends Record<string, AnyTable>
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Db<S>