콘텐츠로 이동
한국어

D1SnapshotStore

이 콘텐츠는 아직 번역되지 않았습니다.

Defined in: src/persistence/snapshot-stores/D1SnapshotStore.ts:15

SnapshotStore backed by Cloudflare D1. Behaviour lives in RelationalSnapshotStore and the SQL is sqliteDialect’s, so the table is schema-compatible with the local SQLite and libSQL snapshot stores.

  • RelationalSnapshotStore

new D1SnapshotStore(options?): D1SnapshotStore

Defined in: src/persistence/snapshot-stores/D1SnapshotStore.ts:16

D1SnapshotStoreOptions = {}

D1SnapshotStore

RelationalSnapshotStore.constructor

close(): Promise<void>

Defined in: src/persistence/LazyStore.ts:66

Promise<void>

RelationalSnapshotStore.close


delete(persistenceId, toSeq): Promise<void>

Defined in: src/persistence/relational/RelationalSnapshotStore.ts:101

Delete snapshots up to and including toSeq. Useful for pruning.

string

number

Promise<void>

RelationalSnapshotStore.delete


loadBefore<S>(persistenceId, seq, _options?): Promise<Option<Snapshot<S>>>

Defined in: src/persistence/relational/RelationalSnapshotStore.ts:94

Load the newest snapshot with sequenceNr < seq, or None.

S

string

number

PersistenceOptions

Promise<Option<Snapshot<S>>>

RelationalSnapshotStore.loadBefore


loadLatest<S>(persistenceId, _options?): Promise<Option<Snapshot<S>>>

Defined in: src/persistence/relational/RelationalSnapshotStore.ts:87

Load the newest snapshot for persistenceId, or None if none exist. options.encryption is required when client-side encryption was used at write time — the store has no other way to obtain the master key. Stores that don’t encrypt ignore the field.

S

string

PersistenceOptions

Promise<Option<Snapshot<S>>>

RelationalSnapshotStore.loadLatest


save<S>(persistenceId, seq, state, _options?): Promise<Snapshot<S>>

Defined in: src/persistence/relational/RelationalSnapshotStore.ts:72

Persist a snapshot at seq — typically the seq of the latest event applied. Optional options carry per-call preferences from the caller (e.g. compression/encryption set on the actor). Stores that cannot honour them silently ignore the field.

S

string

number

S

PersistenceOptions

Promise<Snapshot<S>>

RelationalSnapshotStore.save