Versions in this module Expand all Collapse all v0 v0.2.0 Oct 16, 2026 v0.1.0 Oct 15, 2026 Changes in this version + var DefaultRunColumns = RunColumns + func Migrate(ctx context.Context, db *sql.DB) error + func Schema() fs.FS + type DBTX interface + ExecContext func(context.Context, string, ...any) (sql.Result, error) + QueryContext func(context.Context, string, ...any) (*sql.Rows, error) + QueryRowContext func(context.Context, string, ...any) *sql.Row + type Hooks interface + AfterNodeWritten func(ctx context.Context, tx DBTX, node workflowruntime.NodeInvocationSnapshot) error + AfterRunWritten func(ctx context.Context, tx DBTX, run workflowruntime.RunSnapshot) error + type Option func(*Store) error + func WithHooks(hooks Hooks) Option + func WithRunColumns(columns RunColumns) Option + type RunColumns struct + CreatedAt string + Generation string + ID string + Status string + Table string + type Store struct + func New(db *sql.DB, opts ...Option) (*Store, error) + func (s *Store) ActivateCompensationEntry(ctx context.Context, r workflowruntime.ActivateCompensationEntryRequest) (workflowruntime.ActivateCompensationEntryResult, error) + func (s *Store) ActivateNodeRetry(ctx context.Context, request workflowruntime.ActivateNodeRetryRequest) (workflowruntime.ActivateNodeRetryResult, error) + func (s *Store) AdmitNode(ctx context.Context, request workflowruntime.AdmitNodeRequest) (workflowruntime.AdmitNodeResult, error) + func (s *Store) AppendEvent(ctx context.Context, request workflowruntime.AppendEventRequest) (workflowruntime.Event, error) + func (s *Store) ApplyExternalOperation(ctx context.Context, request workflowruntime.ApplyExternalOperationRequest) (workflowruntime.ApplyExternalOperationResult, error) + func (s *Store) ApplyRunFailurePolicy(ctx context.Context, request workflowruntime.ApplyRunFailurePolicyRequest) (workflowruntime.ApplyRunFailurePolicyResult, error) + func (s *Store) ApplyServiceHeartbeat(ctx context.Context, request workflowruntime.ApplyServiceHeartbeatRequest) (workflowruntime.ServiceSnapshot, error) + func (s *Store) ApplyServiceReady(ctx context.Context, request workflowruntime.ApplyServiceReadyRequest) (workflowruntime.ApplyServiceReadyResult, error) + func (s *Store) ApplyServiceStop(ctx context.Context, request workflowruntime.ApplyServiceStopRequest) (workflowruntime.ApplyServiceStopResult, error) + func (s *Store) BeginManualCompensation(ctx context.Context, r workflowruntime.BeginManualCompensationRequest) (workflowruntime.FreezeCompensationResult, error) + func (s *Store) BeginReactorContinuation(ctx context.Context, request workflowruntime.ReactorContinuationRequest) (workflowruntime.ReactorSnapshot, workflowruntime.ReactorContinuationSnapshot, ...) + func (s *Store) BeginReactorDelivery(ctx context.Context, request workflowruntime.BeginReactorDeliveryRequest) (workflowruntime.ReactorSnapshot, workflowruntime.ReactorDeliverySnapshot, ...) + func (s *Store) BeginReplay(ctx context.Context, request workflowruntime.BeginReplayRequest) (workflowruntime.BeginReplayResult, error) + func (s *Store) BeginRunUpdate(ctx context.Context, request workflowruntime.BeginRunUpdateRequest) (workflowruntime.RunUpdateSnapshot, workflowruntime.IdempotencyOutcome, error) + func (s *Store) BeginTerminalIntent(ctx context.Context, request workflowruntime.BeginTerminalIntentRequest) (workflowruntime.BeginTerminalIntentResult, error) + func (s *Store) BindNodeInputs(ctx context.Context, request workflowruntime.BindNodeInputsRequest) (workflowruntime.BindNodeInputsResult, error) + func (s *Store) BindPin(ctx context.Context, request workflowruntime.BindPinRequest) (workflowruntime.BindPinResult, error) + func (s *Store) CancelCompensation(ctx context.Context, r workflowruntime.CancelCompensationRequest) (workflowruntime.CompensationLedgerSnapshot, error) + func (s *Store) ClaimNode(ctx context.Context, request workflowruntime.ClaimNodeRequest) (workflowruntime.ClaimResult, error) + func (s *Store) ClaimReactorDelivery(ctx context.Context, request workflowruntime.ClaimReactorDeliveryRequest) (workflowruntime.ReactorDeliverySnapshot, error) + func (s *Store) CompleteFanOut(ctx context.Context, request workflowruntime.CompleteFanOutRequest) (workflowruntime.CompleteFanOutResult, error) + func (s *Store) CompleteReactorContinuation(ctx context.Context, key string, expected uint64, at time.Time) (workflowruntime.ReactorSnapshot, workflowruntime.ReactorContinuationSnapshot, ...) + func (s *Store) CompleteReactorDelivery(ctx context.Context, request workflowruntime.CompleteReactorDeliveryRequest) (workflowruntime.ReactorSnapshot, workflowruntime.ReactorDeliverySnapshot, ...) + func (s *Store) CompleteRunUpdate(ctx context.Context, request workflowruntime.CompleteRunUpdateRequest) (workflowruntime.RunUpdateSnapshot, error) + func (s *Store) CompleteTerminalIntent(ctx context.Context, request workflowruntime.CompleteTerminalIntentRequest) (workflowruntime.CompleteTerminalIntentResult, error) + func (s *Store) CreateNodeInvocation(ctx context.Context, request workflowruntime.CreateNodeInvocationRequest) (workflowruntime.NodeInvocationSnapshot, error) + func (s *Store) CreateRun(ctx context.Context, request workflowruntime.CreateRunRequest) (workflowruntime.RunSnapshot, workflowruntime.IdempotencyOutcome, error) + func (s *Store) DB() *sql.DB + func (s *Store) ExpandFanOut(ctx context.Context, request workflowruntime.ExpandFanOutRequest) (workflowruntime.ExpandFanOutResult, error) + func (s *Store) FailCompensationEntry(ctx context.Context, r workflowruntime.FailCompensationEntryRequest) (workflowruntime.SealCompensationEntryResult, error) + func (s *Store) FailReactor(ctx context.Context, request workflowruntime.FailReactorRequest) (workflowruntime.ReactorSnapshot, error) + func (s *Store) FindOpenSignalWait(ctx context.Context, selector workflowruntime.SignalSelector) (workflowruntime.WaitSnapshot, error) + func (s *Store) FindSignalWait(ctx context.Context, selector workflowruntime.SignalSelector, ...) (workflowruntime.WaitSnapshot, error) + func (s *Store) FinishCompensableAttempt(ctx context.Context, request workflowruntime.FinishCompensableAttemptRequest) (workflowruntime.FinishCompensableAttemptResult, error) + func (s *Store) FinishNodeAttempt(ctx context.Context, request workflowruntime.FinishNodeAttemptRequest) (workflowruntime.FinishNodeAttemptResult, error) + func (s *Store) FreezeCompensation(ctx context.Context, r workflowruntime.FreezeCompensationRequest) (workflowruntime.FreezeCompensationResult, error) + func (s *Store) GetCacheEntry(ctx context.Context, key string, now time.Time) (workflowruntime.CacheEntry, bool, error) + func (s *Store) GetPinnedValue(ctx context.Context, key string, now time.Time) (workflowruntime.PinnedValue, bool, error) + func (s *Store) InspectSchedulerResources(ctx context.Context, request workflowruntime.SchedulerResourceQuery) (workflowruntime.SchedulerResourceState, error) + func (s *Store) ListAttempts(ctx context.Context, id workflowruntime.NodeInvocationID) ([]workflowruntime.AttemptSnapshot, error) + func (s *Store) ListChildRuns(ctx context.Context, parent workflowruntime.RunID) ([]workflowruntime.ChildRunLink, error) + func (s *Store) ListCompensationEntries(ctx context.Context, runID workflowruntime.RunID) ([]workflowruntime.CompensationEntrySnapshot, error) + func (s *Store) ListEvents(ctx context.Context, query workflowruntime.EventQuery) ([]workflowruntime.Event, error) + func (s *Store) ListPinnedValues(ctx context.Context, now time.Time) ([]workflowruntime.PinnedValue, error) + func (s *Store) ListRunInvocations(ctx context.Context, runID workflowruntime.RunID) ([]workflowruntime.NodeInvocationSnapshot, error) + func (s *Store) LoadAttempt(ctx context.Context, id workflowruntime.AttemptID) (workflowruntime.AttemptSnapshot, error) + func (s *Store) LoadCompensationEntryByHandler(ctx context.Context, id workflowruntime.NodeInvocationID) (workflowruntime.CompensationEntrySnapshot, error) + func (s *Store) LoadCompensationLedger(ctx context.Context, runID workflowruntime.RunID) (workflowruntime.CompensationLedgerSnapshot, error) + func (s *Store) LoadControlDecision(ctx context.Context, id workflowruntime.ControlDecisionID) (workflowruntime.ControlDecisionSnapshot, error) + func (s *Store) LoadExternalOperation(ctx context.Context, id workflowruntime.AttemptID) (workflowruntime.ExternalOperationSnapshot, error) + func (s *Store) LoadFanOut(ctx context.Context, parent workflowruntime.NodeInvocationID) (workflowruntime.FanOutSnapshot, error) + func (s *Store) LoadFanOutItemResults(ctx context.Context, parent workflowruntime.NodeInvocationID) ([]workflowruntime.FanOutItemResult, error) + func (s *Store) LoadMemoEntry(ctx context.Context, key string) (workflowruntime.MemoEntry, error) + func (s *Store) LoadNodeInvocation(ctx context.Context, id workflowruntime.NodeInvocationID) (workflowruntime.NodeInvocationSnapshot, error) + func (s *Store) LoadPin(ctx context.Context, id workflowruntime.NodeInvocationID) (workflowruntime.PinBinding, error) + func (s *Store) LoadPlan(ctx context.Context, digest string) (workflowruntime.PlanRef, error) + func (s *Store) LoadReactor(ctx context.Context, id string) (workflowruntime.ReactorSnapshot, error) + func (s *Store) LoadReactorDelivery(ctx context.Context, reactorID, key string) (workflowruntime.ReactorDeliverySnapshot, error) + func (s *Store) LoadReplayProvenance(ctx context.Context, runID workflowruntime.RunID) (workflowruntime.ReplayProvenance, error) + func (s *Store) LoadRetryActivation(ctx context.Context, id string) (workflowruntime.RetryActivationSnapshot, error) + func (s *Store) LoadRun(ctx context.Context, id workflowruntime.RunID) (workflowruntime.RunSnapshot, error) + func (s *Store) LoadRunPolicyDecision(ctx context.Context, runID workflowruntime.RunID) (workflowruntime.RunPolicyDecisionSnapshot, error) + func (s *Store) LoadRunUpdate(ctx context.Context, key string) (workflowruntime.RunUpdateSnapshot, error) + func (s *Store) LoadService(ctx context.Context, start workflowruntime.NodeInvocationID) (workflowruntime.ServiceSnapshot, error) + func (s *Store) LoadTerminalIntent(ctx context.Context, runID workflowruntime.RunID) (workflowruntime.TerminalIntentSnapshot, error) + func (s *Store) LoadValueRecord(ctx context.Context, ref values.ValueSetRef) (workflowruntime.ValueRecord, error) + func (s *Store) LoadValues(ctx context.Context, ref values.ValueSetRef) (values.ValueSet, error) + func (s *Store) LoadWait(ctx context.Context, id workflowruntime.WaitID) (workflowruntime.WaitSnapshot, error) + func (s *Store) LoadWaitContinuation(ctx context.Context, id workflowruntime.AttemptID) (workflowruntime.WaitSnapshot, error) + func (s *Store) MarkReactorWaiting(ctx context.Context, id string, expected uint64, at time.Time) (workflowruntime.ReactorSnapshot, error) + func (s *Store) PrepareServiceStart(ctx context.Context, request workflowruntime.PrepareServiceStartRequest) (workflowruntime.ServiceSnapshot, error) + func (s *Store) PutCacheEntry(ctx context.Context, entry workflowruntime.CacheEntry) error + func (s *Store) PutPinnedValue(ctx context.Context, pin workflowruntime.PinnedValue) error + func (s *Store) QueryRunState(ctx context.Context, request workflowruntime.RunStateQuery) (workflowruntime.RunStateView, error) + func (s *Store) ReconcileCrashedAttempt(ctx context.Context, request workflowruntime.ReconcileCrashedAttemptRequest) (workflowruntime.ReconcileCrashedAttemptResult, error) + func (s *Store) RecordChildRun(ctx context.Context, link workflowruntime.ChildRunLink) error + func (s *Store) RecordControlDecision(ctx context.Context, request workflowruntime.RecordControlDecisionRequest) (workflowruntime.RecordControlDecisionResult, error) + func (s *Store) RecordExternalActivation(ctx context.Context, request workflowruntime.ExternalActivationRequest) (workflowruntime.ExternalActivationSnapshot, workflowruntime.IdempotencyOutcome, ...) + func (s *Store) RecordMemoEntry(ctx context.Context, entry workflowruntime.MemoEntry) (workflowruntime.MemoEntry, workflowruntime.IdempotencyOutcome, error) + func (s *Store) RecordPlan(ctx context.Context, plan workflowruntime.PlanRef) error + func (s *Store) RecoverCancellationIntents(ctx context.Context, query workflowruntime.CancellationIntentQuery) ([]workflowruntime.CancellationIntentSnapshot, error) + func (s *Store) RecoverChildTerminalWaits(ctx context.Context, limit int) ([]workflowruntime.ChildTerminalWait, error) + func (s *Store) RecoverCompensation(ctx context.Context, limit int) ([]workflowruntime.CompensationLedgerSnapshot, error) + func (s *Store) RecoverExternalOperations(ctx context.Context, query workflowruntime.ExternalOperationQuery) ([]workflowruntime.ExternalOperationSnapshot, error) + func (s *Store) RecoverOpenWaits(ctx context.Context, query workflowruntime.OpenWaitQuery) ([]workflowruntime.WaitSnapshot, error) + func (s *Store) RecoverReactorContinuations(ctx context.Context, limit int) ([]workflowruntime.ReactorContinuationSnapshot, error) + func (s *Store) RecoverReactorDeliveries(ctx context.Context, limit int) ([]workflowruntime.ReactorDeliverySnapshot, error) + func (s *Store) RecoverReactors(ctx context.Context, limit int) ([]workflowruntime.ReactorSnapshot, error) + func (s *Store) RecoverRetryActivations(ctx context.Context, query workflowruntime.RetryActivationQuery) ([]workflowruntime.RetryActivationSnapshot, error) + func (s *Store) RecoverRunUpdates(ctx context.Context, limit int) ([]workflowruntime.RunUpdateSnapshot, error) + func (s *Store) RecoverServiceStart(ctx context.Context, request workflowruntime.RecoverServiceStartRequest) (workflowruntime.SuspendServiceStartResult, error) + func (s *Store) RecoverServices(ctx context.Context, query workflowruntime.ServiceQuery) ([]workflowruntime.ServiceSnapshot, error) + func (s *Store) Recovery(ctx context.Context, query workflowruntime.RecoveryQuery) (workflowruntime.RecoverySnapshot, error) + func (s *Store) ReleaseNodeClaim(ctx context.Context, request workflowruntime.ReleaseClaimRequest) error + func (s *Store) ReleaseReactorDelivery(ctx context.Context, request workflowruntime.ReleaseReactorDeliveryRequest) (workflowruntime.ReactorDeliverySnapshot, error) + func (s *Store) RenewNodeLease(ctx context.Context, request workflowruntime.RenewLeaseRequest) (workflowruntime.ClaimLease, error) + func (s *Store) RequestExternalOperationCancel(ctx context.Context, ...) (workflowruntime.RequestExternalOperationCancelResult, error) + func (s *Store) RequestRunCancellation(ctx context.Context, request workflowruntime.RequestRunCancellationRequest) (workflowruntime.RequestRunCancellationResult, error) + func (s *Store) RequestRunCancellationWithFinalizers(ctx context.Context, ...) (workflowruntime.RequestRunCancellationWithFinalizersResult, error) + func (s *Store) ResolveCancellationIntent(ctx context.Context, request workflowruntime.ResolveCancellationIntentRequest) (workflowruntime.ResolveCancellationIntentResult, error) + func (s *Store) ResumeNodeWait(ctx context.Context, request workflowruntime.ResumeNodeWaitRequest) (workflowruntime.ResumeWaitResult, error) + func (s *Store) RetryCompensation(ctx context.Context, r workflowruntime.RetryCompensationRequest) (workflowruntime.CompensationLedgerSnapshot, error) + func (s *Store) ReuseNodeOutputs(ctx context.Context, request workflowruntime.ReuseNodeOutputsRequest) (workflowruntime.ReuseNodeOutputsResult, error) + func (s *Store) SaveNodeInvocation(ctx context.Context, request workflowruntime.SaveNodeInvocationRequest) (workflowruntime.NodeInvocationSnapshot, error) + func (s *Store) SaveRun(ctx context.Context, request workflowruntime.SaveRunRequest) (workflowruntime.RunSnapshot, error) + func (s *Store) SaveValues(ctx context.Context, request workflowruntime.SaveValuesRequest) (values.ValueSetRef, error) + func (s *Store) ScheduleNodeRetry(ctx context.Context, request workflowruntime.ScheduleNodeRetryRequest) (workflowruntime.ScheduleNodeRetryResult, error) + func (s *Store) SealCompensationEntry(ctx context.Context, r workflowruntime.SealCompensationEntryRequest) (workflowruntime.SealCompensationEntryResult, error) + func (s *Store) StartNodeAttempt(ctx context.Context, request workflowruntime.StartNodeAttemptRequest) (workflowruntime.StartNodeAttemptResult, error) + func (s *Store) SuspendExternalOperation(ctx context.Context, request workflowruntime.SuspendExternalOperationRequest) (workflowruntime.SuspendExternalOperationResult, error) + func (s *Store) SuspendNodeWait(ctx context.Context, request workflowruntime.SuspendNodeWaitRequest) (workflowruntime.SuspendWaitResult, error) + func (s *Store) SuspendServiceStart(ctx context.Context, request workflowruntime.SuspendServiceStartRequest) (workflowruntime.SuspendServiceStartResult, error) + func (s *Store) SuspendServiceTeardown(ctx context.Context, request workflowruntime.SuspendServiceTeardownRequest) (workflowruntime.SuspendServiceTeardownResult, error) + func (s *Store) TimeoutWait(ctx context.Context, request workflowruntime.TimeoutWaitRequest) (workflowruntime.WaitTimeoutResult, error) + func (s *Store) TransitionNode(ctx context.Context, request workflowruntime.NodeTransitionRequest) (workflowruntime.NodeTransitionResult, error) + func (s *Store) TransitionRun(ctx context.Context, request workflowruntime.RunTransitionRequest) (workflowruntime.RunTransitionResult, error) + func (s *Store) WriteTx(ctx context.Context, operation string, fn func(DBTX) error) error