D1Connection
Ce contenu n’est pas encore disponible dans votre langue.
D1Connection =
object
Defined in: src/persistence/journals/D1Client.ts:47
Connection options shared by all three D1 stores.
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.
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.
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.
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.
databaseId?
Section titled “databaseId?”
readonlyoptionaldatabaseId?:string
Defined in: src/persistence/journals/D1Client.ts:51
D1 database id (the UUID, not the database name).
timeoutMs?
Section titled “timeoutMs?”
readonlyoptionaltimeoutMs?:number
Defined in: src/persistence/journals/D1Client.ts:61
Per-request timeout in milliseconds. Default 30 000.
