Skip to content

Search the guides, deployment pages, and API reference.

D1DatabaseOptions

import type { D1DatabaseOptions } from "@pitlane/data-table-d1";

The options createD1Database accepts: remix/data-table's DatabaseOptions, plus D1's statement observer and transaction mode.

Extends

  • DatabaseOptions

Properties

now?

optional now?: () => unknown;

Clock function used for auto-managed timestamps.

Returns

unknown

Inherited from

DatabaseOptions.now

onStatement?

optional onStatement?: D1StatementObserver;

Called after each statement, with the rows read, rows written, and duration D1 reported for it. See D1StatementObserver.


transactions?

optional transactions?: D1TransactionMode;

What transaction() does. Defaults to throw, because D1 has no transactions; unsafe-nonatomic accepts the call and gives up atomicity. See D1TransactionMode.