EdgeBase D1 database adapter for Cloudflare Workers
npm install @edgebasejs/adapter-d1Cloudflare D1 adapter for EdgeBase. Provides database helpers and schema initialization for D1.
``bash`
pnpm add @edgebasejs/adapter-d1
- D1SyncDatabase adapter for the sync engineinitializeDatabase
- to create system tables and entity tables
`ts
import { D1SyncDatabase, initializeDatabase } from '@edgebasejs/adapter-d1';
// One-time setup
await initializeDatabase(db, schema);
// Use with the EdgeBase worker
const syncDb = new D1SyncDatabase(db);
``
Use this adapter inside Cloudflare Workers (D1). For other databases, implement the same interface.