MsSqlDurableStateStore
Este conteúdo não está disponível em sua língua ainda.
Defined in: src/persistence/durable-state-stores/MsSqlDurableStateStore.ts:20
DurableStateStore backed by Microsoft SQL Server (mssql).
Behaviour lives in RelationalDurableStateStore; this class supplies the
T-SQL dialect, whose revision-0 insert is an unguarded INSERT, so a
collision arrives as error 2627 rather than zero affected rows. T-SQL has no
ON CONFLICT DO NOTHING, and both alternatives (MERGE, INSERT … WHERE NOT EXISTS) would still have to handle the same race — letting the primary key
report it is shorter and correct under concurrency.
Extends
Section titled “Extends”RelationalDurableStateStore
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MsSqlDurableStateStore(
options?):MsSqlDurableStateStore
Defined in: src/persistence/durable-state-stores/MsSqlDurableStateStore.ts:21
Parameters
Section titled “Parameters”options?
Section titled “options?”MsSqlDurableStateStoreOptions = {}
Returns
Section titled “Returns”MsSqlDurableStateStore
Overrides
Section titled “Overrides”RelationalDurableStateStore.constructor
Methods
Section titled “Methods”close()
Section titled “close()”close():
Promise<void>
Defined in: src/persistence/LazyStore.ts:66
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”RelationalDurableStateStore.close
delete()
Section titled “delete()”delete(
persistenceId):Promise<void>
Defined in: src/persistence/relational/RelationalDurableStateStore.ts:137
Remove the record entirely. Idempotent.
Parameters
Section titled “Parameters”persistenceId
Section titled “persistenceId”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”RelationalDurableStateStore.delete
load()
Section titled “load()”load<
S>(persistenceId,_options?):Promise<Option<DurableStateRecord<S>>>
Defined in: src/persistence/relational/RelationalDurableStateStore.ts:124
Load the latest record for persistenceId, or None if none exists.
options.encryption is required when client-side encryption was
used at write time.
Type Parameters
Section titled “Type Parameters”S
Parameters
Section titled “Parameters”persistenceId
Section titled “persistenceId”string
_options?
Section titled “_options?”PersistenceOptions
Returns
Section titled “Returns”Promise<Option<DurableStateRecord<S>>>
Inherited from
Section titled “Inherited from”RelationalDurableStateStore.load
upsert()
Section titled “upsert()”upsert<
S>(persistenceId,expectedRevision,state,_options?):Promise<DurableStateRecord<S>>
Defined in: src/persistence/relational/RelationalDurableStateStore.ts:76
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.
Type Parameters
Section titled “Type Parameters”S
Parameters
Section titled “Parameters”persistenceId
Section titled “persistenceId”string
expectedRevision
Section titled “expectedRevision”number
S
_options?
Section titled “_options?”PersistenceOptions
Returns
Section titled “Returns”Promise<DurableStateRecord<S>>
Inherited from
Section titled “Inherited from”RelationalDurableStateStore.upsert
