コンテンツにスキップ
日本語

D1DurableStateStoreOptionsType

このコンテンツはまだ日本語訳がありません。

Defined in: src/persistence/durable-state-stores/D1DurableStateStoreOptions.ts:8

  • D1OptionsBaseType

readonly optional accountId?: string

Defined in: src/persistence/journals/D1Client.ts:49

Cloudflare account id. Required unless client is supplied.

D1OptionsBaseType.accountId


readonly optional apiToken?: string

Defined in: src/persistence/journals/D1Client.ts:57

API token with the D1:Edit permission. Sent as a bearer token, so treat it like any other secret — read it from the environment rather than committing it.

D1OptionsBaseType.apiToken


readonly optional autoCreateTables?: boolean

Defined in: src/persistence/durable-state-stores/D1DurableStateStoreOptions.ts:12

Run CREATE TABLE IF NOT EXISTS on first use. Default: true.


readonly optional baseUrl?: string

Defined in: src/persistence/journals/D1Client.ts:59

API base URL. Override only for a proxy or a test double.

D1OptionsBaseType.baseUrl


readonly optional client?: D1ClientLike

Defined in: src/persistence/journals/D1Client.ts:67

Pre-built transport — bypasses the HTTP client entirely. Use to share ONE transport across the journal, snapshot and durable-state stores (see registerD1Plugins), or to inject a fake in tests.

D1OptionsBaseType.client


readonly optional databaseId?: string

Defined in: src/persistence/journals/D1Client.ts:51

D1 database id (the UUID, not the database name).

D1OptionsBaseType.databaseId


readonly optional serializer?: Serializer<unknown>

Defined in: src/persistence/storage/StoreSerializerOptions.ts:23

Custom payload serializer. When set, the store writes rows in the self-describing __serialized__ framing (see PayloadCodec) instead of the default tagged JSON; rows of both formats can coexist in one stream, but reading a framed row back requires a serializer with the same id to be configured.

D1OptionsBaseType.serializer


readonly optional table?: string

Defined in: src/persistence/durable-state-stores/D1DurableStateStoreOptions.ts:10

Durable-state table name. Default: durable_state.


readonly optional timeoutMs?: number

Defined in: src/persistence/journals/D1Client.ts:61

Per-request timeout in milliseconds. Default 30 000.

D1OptionsBaseType.timeoutMs