D1SnapshotStoreOptionsType
此内容尚不支持你的语言。
Defined in: src/persistence/snapshot-stores/D1SnapshotStoreOptions.ts:8
Extends
Section titled “Extends”D1OptionsBaseType
Properties
Section titled “Properties”accountId?
Section titled “accountId?”
readonlyoptionalaccountId?:string
Defined in: src/persistence/journals/D1Client.ts:49
Cloudflare account id. Required unless client is supplied.
Inherited from
Section titled “Inherited from”D1OptionsBaseType.accountId
apiToken?
Section titled “apiToken?”
readonlyoptionalapiToken?: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.
Inherited from
Section titled “Inherited from”D1OptionsBaseType.apiToken
autoCreateTables?
Section titled “autoCreateTables?”
readonlyoptionalautoCreateTables?:boolean
Defined in: src/persistence/snapshot-stores/D1SnapshotStoreOptions.ts:14
Run CREATE TABLE IF NOT EXISTS on first use. Default: true.
baseUrl?
Section titled “baseUrl?”
readonlyoptionalbaseUrl?:string
Defined in: src/persistence/journals/D1Client.ts:59
API base URL. Override only for a proxy or a test double.
Inherited from
Section titled “Inherited from”D1OptionsBaseType.baseUrl
client?
Section titled “client?”
readonlyoptionalclient?: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.
Inherited from
Section titled “Inherited from”D1OptionsBaseType.client
databaseId?
Section titled “databaseId?”
readonlyoptionaldatabaseId?:string
Defined in: src/persistence/journals/D1Client.ts:51
D1 database id (the UUID, not the database name).
Inherited from
Section titled “Inherited from”D1OptionsBaseType.databaseId
keepN?
Section titled “keepN?”
readonlyoptionalkeepN?:number
Defined in: src/persistence/snapshot-stores/D1SnapshotStoreOptions.ts:12
How many snapshots to keep per persistence id. Default: 3; <= 0 keeps all.
serializer?
Section titled “serializer?”
readonlyoptionalserializer?: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.
Inherited from
Section titled “Inherited from”D1OptionsBaseType.serializer
snapshotsTable?
Section titled “snapshotsTable?”
readonlyoptionalsnapshotsTable?:string
Defined in: src/persistence/snapshot-stores/D1SnapshotStoreOptions.ts:10
Snapshots table name. Default: snapshots.
timeoutMs?
Section titled “timeoutMs?”
readonlyoptionaltimeoutMs?:number
Defined in: src/persistence/journals/D1Client.ts:61
Per-request timeout in milliseconds. Default 30 000.
Inherited from
Section titled “Inherited from”D1OptionsBaseType.timeoutMs
