跳转到内容
简体中文

MariaDbDurableStateStore

此内容尚不支持你的语言。

Defined in: src/persistence/durable-state-stores/MariaDbDurableStateStore.ts:43

DurableStateStore backed by MariaDB / MySQL (mariadb). Sibling of PostgresDurableStateStore with the MariaDB dialect for the revision CAS:

  • create (expectedRevision 0): plain INSERT; a duplicate-key error (1062) means the row already exists → conflict.
  • update (expectedRevision > 0): UPDATE … WHERE revision = expected; affectedRows === 0 means the stored revision diverged → conflict. (revision always changes, so a matched row always reports 1.)

new MariaDbDurableStateStore(options?): MariaDbDurableStateStore

Defined in: src/persistence/durable-state-stores/MariaDbDurableStateStore.ts:52

MariaDbDurableStateStoreOptions = {}

MariaDbDurableStateStore

close(): Promise<void>

Defined in: src/persistence/durable-state-stores/MariaDbDurableStateStore.ts:127

Promise<void>


delete(persistenceId): Promise<void>

Defined in: src/persistence/durable-state-stores/MariaDbDurableStateStore.ts:122

Remove the record entirely. Idempotent.

string

Promise<void>

DurableStateStore.delete


load<S>(persistenceId, _options?): Promise<Option<DurableStateRecord<S>>>

Defined in: src/persistence/durable-state-stores/MariaDbDurableStateStore.ts:106

Load the latest record for persistenceId, or None if none exists. options.encryption is required when client-side encryption was used at write time.

S

string

PersistenceOptions

Promise<Option<DurableStateRecord<S>>>

DurableStateStore.load


upsert<S>(persistenceId, expectedRevision, state, _options?): Promise<DurableStateRecord<S>>

Defined in: src/persistence/durable-state-stores/MariaDbDurableStateStore.ts:58

Upsert the state for persistenceId. expectedRevision must match the current stored revision (0 when no record exists yet). Throws DurableStateConcurrencyError on conflict. 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<DurableStateRecord<S>>

DurableStateStore.upsert