Table of Contents

Class LoadSagaRequest<TSagaState>

Namespace
Excalibur.Saga.Postgres
Assembly
Excalibur.Saga.Postgres.dll

Represents a data request to load a saga state from the Postgres saga store.

public sealed class LoadSagaRequest<TSagaState> : DataRequestBase<IDbConnection, TSagaState?>, IDataRequest<IDbConnection, TSagaState?>, IDataRequest where TSagaState : SagaState

Type Parameters

TSagaState

The type of the saga state.

Inheritance
LoadSagaRequest<TSagaState>
Implements
Inherited Members

Remarks

This request uses Postgres's snake_case column naming convention and JSONB storage for efficient saga state retrieval.

Constructors

LoadSagaRequest(Guid, PostgresSagaOptions, DispatchJsonSerializer, TenantScope, CancellationToken)

Initializes a new instance of the LoadSagaRequest<TSagaState> class.

public LoadSagaRequest(Guid sagaId, PostgresSagaOptions options, DispatchJsonSerializer serializer, TenantScope scope, CancellationToken cancellationToken)

Parameters

sagaId Guid

The unique identifier of the saga to load.

options PostgresSagaOptions

The Postgres saga store options.

serializer DispatchJsonSerializer

The JSON serializer for deserializing saga state.

scope TenantScope

The tenant scope for row-level tenant scoping. When tenant-scoped, the load is restricted to the current tenant's saga (AND tenant_id = @TenantId) so a tenant can never load another tenant's saga by id. An untenanted scope binds the reserved sentinel, so the predicate is applied either way. A tenant-scoped scope cannot be constructed without a tenant, so a predicate-less load while tenancy is active is unrepresentable.

cancellationToken CancellationToken

The cancellation token.