| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
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
- data ExternalReadReconciliationError
- = ExternalReadAllRowsRequiresSingleTarget !ExternalReadContractId !ExternalReadContractVersion
- | ExternalReadResultTypeMissing !QualifiedSqlType
- | ExternalReadResultTypeNotComposite !QualifiedSqlType
- | ExternalReadPrivateImplementationMissing !QualifiedFunction
- | ExternalReadPrivateImplementationResultMismatch !QualifiedFunction !QualifiedSqlType
- | ExternalReadImmutableSignatureConflict !ExternalReadContractId !ExternalReadContractVersion
- | ExternalReadDefinitionGenerationConflict !ExternalReadContractId !ExternalReadContractVersion !Int
- | ExternalReadSurfaceDowngrade !ExternalReadContractId !ExternalReadContractVersion !Int !Int
- | ExternalReadRetiredContractCannotReactivate !ExternalReadContractId !ExternalReadContractVersion
- | ExternalReadUnmanagedObjectCollision !Text !Text !Text
- | ExternalReadManagedObjectOwnershipConflict !Text !Text !Text
- data ExternalReadRetirementError
- data ExternalReadRetirementPreview = ExternalReadRetirementPreview {}
- reconcileExternalReadContracts :: forall (es :: [Effect]). Store :> es => ValidatedProjectionCatalog -> Eff es (Either ExternalReadReconciliationError ())
- reconcileExternalReadContractsTx :: ValidatedProjectionCatalog -> Transaction (Either ExternalReadReconciliationError ())
- reconcileExternalReadContractsForGroupsTx :: ValidatedProjectionCatalog -> Maybe (Set RebuildGroupId) -> Transaction (Either ExternalReadReconciliationError ())
- previewExternalReadContractRetirement :: forall (es :: [Effect]). Store :> es => ExternalReadContractId -> ExternalReadContractVersion -> Eff es (Either ExternalReadRetirementError ExternalReadRetirementPreview)
- retireExternalReadContract :: forall (es :: [Effect]). Store :> es => ExternalReadContractId -> ExternalReadContractVersion -> Eff es (Either ExternalReadRetirementError ExternalReadRetirementPreview)
Documentation
data ExternalReadReconciliationError Source #
Constructors
Instances
data ExternalReadRetirementError Source #
Constructors
| ExternalReadRetirementUnknown !ExternalReadContractId !ExternalReadContractVersion | |
| ExternalReadRetirementAlreadyRetired !ExternalReadContractId !ExternalReadContractVersion |
Instances
| Generic ExternalReadRetirementError Source # | |||||
Defined in Keiro.ReadModel.External Associated Types
Methods from :: ExternalReadRetirementError -> Rep ExternalReadRetirementError x # to :: Rep ExternalReadRetirementError x -> ExternalReadRetirementError # | |||||
| Show ExternalReadRetirementError Source # | |||||
Defined in Keiro.ReadModel.External Methods showsPrec :: Int -> ExternalReadRetirementError -> ShowS # show :: ExternalReadRetirementError -> String # showList :: [ExternalReadRetirementError] -> ShowS # | |||||
| Eq ExternalReadRetirementError Source # | |||||
Defined in Keiro.ReadModel.External Methods (==) :: ExternalReadRetirementError -> ExternalReadRetirementError -> Bool # (/=) :: ExternalReadRetirementError -> ExternalReadRetirementError -> Bool # | |||||
| type Rep ExternalReadRetirementError Source # | |||||
Defined in Keiro.ReadModel.External type Rep ExternalReadRetirementError = D1 ('MetaData "ExternalReadRetirementError" "Keiro.ReadModel.External" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "ExternalReadRetirementUnknown" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion)) :+: C1 ('MetaCons "ExternalReadRetirementAlreadyRetired" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExternalReadContractVersion))) | |||||
data ExternalReadRetirementPreview Source #
Constructors
| ExternalReadRetirementPreview | |
Fields
| |
Instances
| Generic ExternalReadRetirementPreview Source # | |||||
Defined in Keiro.ReadModel.External Associated Types
| |||||
| Show ExternalReadRetirementPreview Source # | |||||
Defined in Keiro.ReadModel.External Methods showsPrec :: Int -> ExternalReadRetirementPreview -> ShowS # show :: ExternalReadRetirementPreview -> String # showList :: [ExternalReadRetirementPreview] -> ShowS # | |||||
| Eq ExternalReadRetirementPreview Source # | |||||
Defined in Keiro.ReadModel.External | |||||
| type Rep ExternalReadRetirementPreview Source # | |||||
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]))))) | |||||
reconcileExternalReadContracts :: forall (es :: [Effect]). Store :> es => ValidatedProjectionCatalog -> Eff es (Either ExternalReadReconciliationError ()) Source #
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.
previewExternalReadContractRetirement :: forall (es :: [Effect]). Store :> es => ExternalReadContractId -> ExternalReadContractVersion -> Eff es (Either ExternalReadRetirementError ExternalReadRetirementPreview) Source #
retireExternalReadContract :: forall (es :: [Effect]). Store :> es => ExternalReadContractId -> ExternalReadContractVersion -> Eff es (Either ExternalReadRetirementError ExternalReadRetirementPreview) Source #