keiro
Safe HaskellNone
LanguageGHC2024

Keiro.ReadModel.External

Description

Managed, versioned PostgreSQL functions for out-of-process read-model consumers. Callers receive execute-only functions in keiro_read; target tables and the private binding views remain inaccessible.

Synopsis

Documentation

data ExternalReadReconciliationError Source #

Instances

Instances details
Generic ExternalReadReconciliationError Source # 
Instance details

Defined in Keiro.ReadModel.External

Associated Types

type Rep ExternalReadReconciliationError 
Instance details

Defined in Keiro.ReadModel.External

type Rep ExternalReadReconciliationError = D1 ('MetaData "ExternalReadReconciliationError" "Keiro.ReadModel.External" "keiro-0.12.0.0-inplace" 'False) (((C1 ('MetaCons "ExternalReadAllRowsRequiresSingleTarget" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion)) :+: C1 ('MetaCons "ExternalReadResultTypeMissing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 QualifiedSqlType))) :+: (C1 ('MetaCons "ExternalReadResultTypeNotComposite" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 QualifiedSqlType)) :+: (C1 ('MetaCons "ExternalReadPrivateImplementationMissing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 QualifiedFunction)) :+: C1 ('MetaCons "ExternalReadPrivateImplementationResultMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 QualifiedFunction) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 QualifiedSqlType))))) :+: ((C1 ('MetaCons "ExternalReadImmutableSignatureConflict" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion)) :+: (C1 ('MetaCons "ExternalReadDefinitionGenerationConflict" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))) :+: C1 ('MetaCons "ExternalReadSurfaceDowngrade" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))))) :+: (C1 ('MetaCons "ExternalReadRetiredContractCannotReactivate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion)) :+: (C1 ('MetaCons "ExternalReadUnmanagedObjectCollision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :+: C1 ('MetaCons "ExternalReadManagedObjectOwnershipConflict" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))))))
Show ExternalReadReconciliationError Source # 
Instance details

Defined in Keiro.ReadModel.External

Eq ExternalReadReconciliationError Source # 
Instance details

Defined in Keiro.ReadModel.External

type Rep ExternalReadReconciliationError Source # 
Instance details

Defined in Keiro.ReadModel.External

type Rep ExternalReadReconciliationError = D1 ('MetaData "ExternalReadReconciliationError" "Keiro.ReadModel.External" "keiro-0.12.0.0-inplace" 'False) (((C1 ('MetaCons "ExternalReadAllRowsRequiresSingleTarget" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion)) :+: C1 ('MetaCons "ExternalReadResultTypeMissing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 QualifiedSqlType))) :+: (C1 ('MetaCons "ExternalReadResultTypeNotComposite" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 QualifiedSqlType)) :+: (C1 ('MetaCons "ExternalReadPrivateImplementationMissing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 QualifiedFunction)) :+: C1 ('MetaCons "ExternalReadPrivateImplementationResultMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 QualifiedFunction) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 QualifiedSqlType))))) :+: ((C1 ('MetaCons "ExternalReadImmutableSignatureConflict" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion)) :+: (C1 ('MetaCons "ExternalReadDefinitionGenerationConflict" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))) :+: C1 ('MetaCons "ExternalReadSurfaceDowngrade" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))))) :+: (C1 ('MetaCons "ExternalReadRetiredContractCannotReactivate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion)) :+: (C1 ('MetaCons "ExternalReadUnmanagedObjectCollision" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :+: C1 ('MetaCons "ExternalReadManagedObjectOwnershipConflict" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))))))

data ExternalReadRetirementError Source #

Instances

Instances details
Generic ExternalReadRetirementError Source # 
Instance details

Defined in Keiro.ReadModel.External

Show ExternalReadRetirementError Source # 
Instance details

Defined in Keiro.ReadModel.External

Eq ExternalReadRetirementError Source # 
Instance details

Defined in Keiro.ReadModel.External

type Rep ExternalReadRetirementError Source # 
Instance details

Defined in Keiro.ReadModel.External

data ExternalReadRetirementPreview Source #

Instances

Instances details
Generic ExternalReadRetirementPreview Source # 
Instance details

Defined in Keiro.ReadModel.External

Associated Types

type Rep ExternalReadRetirementPreview 
Instance details

Defined in Keiro.ReadModel.External

type Rep ExternalReadRetirementPreview = D1 ('MetaData "ExternalReadRetirementPreview" "Keiro.ReadModel.External" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "ExternalReadRetirementPreview" 'PrefixI 'True) ((S1 ('MetaSel ('Just "contractId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: (S1 ('MetaSel ('Just "contractVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion) :*: S1 ('MetaSel ('Just "publicFunction") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :*: ((S1 ('MetaSel ('Just "currentState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "surfaceGeneration") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "dependentObjects") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "executeGrants") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text])))))
Show ExternalReadRetirementPreview Source # 
Instance details

Defined in Keiro.ReadModel.External

Eq ExternalReadRetirementPreview Source # 
Instance details

Defined in Keiro.ReadModel.External

type Rep ExternalReadRetirementPreview Source # 
Instance details

Defined in Keiro.ReadModel.External

type Rep ExternalReadRetirementPreview = D1 ('MetaData "ExternalReadRetirementPreview" "Keiro.ReadModel.External" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "ExternalReadRetirementPreview" 'PrefixI 'True) ((S1 ('MetaSel ('Just "contractId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: (S1 ('MetaSel ('Just "contractVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion) :*: S1 ('MetaSel ('Just "publicFunction") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :*: ((S1 ('MetaSel ('Just "currentState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "surfaceGeneration") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "dependentObjects") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "executeGrants") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text])))))

reconcileExternalReadContractsTx :: ValidatedProjectionCatalog -> Transaction (Either ExternalReadReconciliationError ()) Source #

Reconcile the complete catalog. Any refusal condemns the transaction, so partially-created functions, views, metadata, and revokes never escape.

reconcileExternalReadContractsForGroupsTx :: ValidatedProjectionCatalog -> Maybe (Set RebuildGroupId) -> Transaction (Either ExternalReadReconciliationError ()) Source #

Reconcile only contracts owned by the selected groups. Nothing means the complete catalog and also marks superseded absent contracts pending retirement. A selected adoption never mutates another group's surface.