CloudflareD1Providerclass
new CloudflareD1Provider<I, T>(db: D1Database)
| Param | Type | |
|---|---|---|
db | D1Database | Minimal D1 binding/session interface used by CloudflareD1Provider. required |
| Return | |
|---|---|
CloudflareD1Provider<I, T> | SQLite database provider backed by Cloudflare D1. |
SQLite database provider backed by Cloudflare D1.
Implements the SQLiteProvider SQL abstraction by binding tagged-template queries and running them through the D1 Worker API.
- Tagged-template values are flattened into positional
?bindings; nestedSQLFragmentvalues are inlined recursively. - Array and plain-object values are JSON-encoded before binding; other non-primitive values throw
ValueError. - The
D1Databasebinding is provided by the Cloudflare Workers runtime environment.