@pitlane/data-table-d1
A Cloudflare D1 driver for Remix 3's data-table.
D1 is SQLite, so the SQL is SQLite's, but the execution model is not:
statements are prepared and awaited over an RPC binding, and the transaction
verbs are rejected outright. @remix-run/data-table-sqlite builds on a
synchronous client and cannot bridge that gap, so this package pairs the
SQLite SQL compiler with a driver written against D1's async API.
See
Classes
- D1Database. A
Databasebound to Cloudflare D1. - D1DatabaseDriver. A
DatabaseDriverbacked by a Cloudflare D1 binding.
Interfaces
- D1BatchResult. What one statement in a D1DatabaseDriver.batch produced.
- D1Binding. The slice of Cloudflare's D1 API this driver uses.
- D1DatabaseOptions. The options createD1Database accepts:
remix/data-table'sDatabaseOptions, plus D1's statement observer and transaction mode. - D1DriverOptions. The options D1DatabaseDriver accepts: the D1-specific half of D1DatabaseOptions, which createD1Database passes through.
- D1Meta. What D1 reports about one statement it ran.
- D1PreparedStatement. A statement D1Binding.prepare returns, before it runs.
- D1Result. What one statement produced: its rows, empty for a write, and D1's metadata.
- D1StatementReport. What one executed statement cost, as D1 reported it.
Type Aliases
- D1StatementObserver. Called after each statement the driver executes.
- D1TransactionMode. How the driver answers a
transaction()call.
Functions
- createD1Database. Wraps a D1 binding in a
Database.