UNPKG

bknd

Version:

Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, React Router, Astro, Cloudflare, Bun, Node, AWS Lambda & more.

17 lines (16 loc) 658 B
import { SqliteConnection } from "bknd/data"; import type { QB } from "../../../data/connection/Connection"; export type D1ConnectionConfig<DB extends D1Database | D1DatabaseSession = D1Database> = { binding: DB; }; export declare class D1Connection<DB extends D1Database | D1DatabaseSession = D1Database> extends SqliteConnection { private config; protected readonly supported: { batching: boolean; }; constructor(config: D1ConnectionConfig<DB>); get client(): DB; protected batch<Queries extends QB[]>(queries: [...Queries]): Promise<{ [K in keyof Queries]: Awaited<ReturnType<Queries[K]["execute"]>>; }>; }