Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data DatabaseContextExprDetails = CountUpdatedTuples
- databaseContextExprDetailsFunc :: DatabaseContextExprDetails -> ResultAccumFunc
- freshDatabaseState :: DatabaseContext -> DatabaseStateElems
- data RelationalExprStateElems
- mkRelationalExprState :: DatabaseContext -> RelationalExprStateElems
- mergeTuplesIntoRelationalExprState :: RelationTuple -> RelationalExprStateElems -> RelationalExprStateElems
- mergeAttributesIntoRelationalExprState :: Attributes -> RelationalExprStateElems -> RelationalExprStateElems
- type ResultAccumName = StringType
- type ResultAccumFunc = (RelationTuple -> Relation -> Relation) -> Relation -> Relation
- data ResultAccum = ResultAccum {}
- type DatabaseStateElems = (DatabaseContext, Map ResultAccumName ResultAccum, DirtyFlag)
- type DatabaseState a = State DatabaseStateElems a
- getStateContext :: DatabaseState DatabaseContext
- putStateContext :: DatabaseContext -> DatabaseState ()
- type RelationalExprState a = Reader RelationalExprStateElems a
- stateElemsContext :: RelationalExprStateElems -> DatabaseContext
- setStateElemsContext :: RelationalExprStateElems -> DatabaseContext -> RelationalExprStateElems
- evalRelationalExpr :: RelationalExpr -> RelationalExprState (Either RelationalError Relation)
- setRelVar :: RelVarName -> Relation -> DatabaseState (Maybe RelationalError)
- deleteRelVar :: RelVarName -> DatabaseState (Maybe RelationalError)
- evalDatabaseContextExpr :: DatabaseContextExpr -> DatabaseState (Maybe RelationalError)
- evalDatabaseContextIOExpr :: Maybe ScriptSession -> DatabaseContext -> DatabaseContextIOExpr -> IO (Either RelationalError DatabaseContext)
- updateTupleWithAtomExprs :: Map AttributeName AtomExpr -> DatabaseContext -> RelationTuple -> Either RelationalError RelationTuple
- checkConstraints :: DatabaseContext -> Maybe RelationalError
- typeForRelationalExpr :: RelationalExpr -> RelationalExprState (Either RelationalError Relation)
- contextWithEmptyTupleSets :: DatabaseContext -> DatabaseContext
- liftE :: Monad m => m (Either a b) -> ExceptT a m b
- predicateRestrictionFilter :: Attributes -> RestrictionPredicateExpr -> RelationalExprState (Either RelationalError (RelationTuple -> Bool))
- tupleExprCheckNewAttrName :: AttributeName -> Relation -> Either RelationalError Relation
- extendTupleExpressionProcessor :: Relation -> ExtendTupleExpr -> RelationalExprState (Either RelationalError (Attributes, RelationTuple -> Either RelationalError RelationTuple))
- evalAtomExpr :: RelationTuple -> AtomExpr -> RelationalExprState (Either RelationalError Atom)
- typeFromAtomExpr :: Attributes -> AtomExpr -> RelationalExprState (Either RelationalError AtomType)
- verifyAtomExprTypes :: Relation -> AtomExpr -> AtomType -> RelationalExprState (Either RelationalError AtomType)
- evalAttrExpr :: TypeConstructorMapping -> AttributeExpr -> Either RelationalError Attribute
- evalTupleExpr :: Maybe Attributes -> TupleExpr -> RelationalExprState (Either RelationalError RelationTuple)
Documentation
freshDatabaseState :: DatabaseContext -> DatabaseStateElems Source #
Used to start a fresh database state for a new database context expression.
mergeTuplesIntoRelationalExprState :: RelationTuple -> RelationalExprStateElems -> RelationalExprStateElems Source #
mergeAttributesIntoRelationalExprState :: Attributes -> RelationalExprStateElems -> RelationalExprStateElems Source #
type ResultAccumName = StringType Source #
type ResultAccumFunc = (RelationTuple -> Relation -> Relation) -> Relation -> Relation Source #
data ResultAccum Source #
type DatabaseState a = State DatabaseStateElems a Source #
putStateContext :: DatabaseContext -> DatabaseState () Source #
type RelationalExprState a = Reader RelationalExprStateElems a Source #
setStateElemsContext :: RelationalExprStateElems -> DatabaseContext -> RelationalExprStateElems Source #
evalRelationalExpr :: RelationalExpr -> RelationalExprState (Either RelationalError Relation) Source #
setRelVar :: RelVarName -> Relation -> DatabaseState (Maybe RelationalError) Source #
evalDatabaseContextIOExpr :: Maybe ScriptSession -> DatabaseContext -> DatabaseContextIOExpr -> IO (Either RelationalError DatabaseContext) Source #
updateTupleWithAtomExprs :: Map AttributeName AtomExpr -> DatabaseContext -> RelationTuple -> Either RelationalError RelationTuple Source #
typeForRelationalExpr :: RelationalExpr -> RelationalExprState (Either RelationalError Relation) Source #
predicateRestrictionFilter :: Attributes -> RestrictionPredicateExpr -> RelationalExprState (Either RelationalError (RelationTuple -> Bool)) Source #
extendTupleExpressionProcessor :: Relation -> ExtendTupleExpr -> RelationalExprState (Either RelationalError (Attributes, RelationTuple -> Either RelationalError RelationTuple)) Source #
evalAtomExpr :: RelationTuple -> AtomExpr -> RelationalExprState (Either RelationalError Atom) Source #
typeFromAtomExpr :: Attributes -> AtomExpr -> RelationalExprState (Either RelationalError AtomType) Source #
verifyAtomExprTypes :: Relation -> AtomExpr -> AtomType -> RelationalExprState (Either RelationalError AtomType) Source #
Validate that the type of the AtomExpr matches the expected type.
evalAttrExpr :: TypeConstructorMapping -> AttributeExpr -> Either RelationalError Attribute Source #
Look up the type's name and create a new attribute.