Safe Haskell | None |
---|---|
Language | Haskell2010 |
- attributes :: Relation -> Attributes
- attributeNames :: Relation -> Set AttributeName
- attributeForName :: AttributeName -> Relation -> Either RelationalError Attribute
- attributesForNames :: Set AttributeName -> Relation -> Attributes
- atomTypeForName :: AttributeName -> Relation -> Either RelationalError AtomType
- mkRelationFromList :: Attributes -> [[Atom]] -> Either RelationalError Relation
- emptyRelationWithAttrs :: Attributes -> Relation
- mkRelation :: Attributes -> RelationTupleSet -> Either RelationalError Relation
- mkRelationDeferVerify :: Attributes -> RelationTupleSet -> Either RelationalError Relation
- mkRelationFromTuples :: Attributes -> [RelationTuple] -> Either RelationalError Relation
- relationTrue :: Relation
- relationFalse :: Relation
- singletonTuple :: Relation -> Maybe RelationTuple
- union :: Relation -> Relation -> Either RelationalError Relation
- project :: AttributeNames -> Relation -> Either RelationalError Relation
- rename :: AttributeName -> AttributeName -> Relation -> Either RelationalError Relation
- arity :: Relation -> Int
- degree :: Relation -> Int
- cardinality :: Relation -> RelationCardinality
- group :: AttributeNames -> AttributeName -> Relation -> Either RelationalError Relation
- restrictEq :: RelationTuple -> Relation -> Either RelationalError Relation
- ungroup :: AttributeName -> Relation -> Either RelationalError Relation
- tupleUngroup :: AttributeName -> Attributes -> RelationTuple -> Either RelationalError Relation
- attributesForRelval :: AttributeName -> Relation -> Either RelationalError Attributes
- type RestrictionFilter = RelationTuple -> Either RelationalError Bool
- restrict :: RestrictionFilter -> Relation -> Either RelationalError Relation
- join :: Relation -> Relation -> Either RelationalError Relation
- difference :: Relation -> Relation -> Either RelationalError Relation
- relMap :: (RelationTuple -> Either RelationalError RelationTuple) -> Relation -> Either RelationalError Relation
- relMogrify :: (RelationTuple -> Either RelationalError RelationTuple) -> Attributes -> Relation -> Either RelationalError Relation
- relFold :: (RelationTuple -> a -> a) -> a -> Relation -> a
- toList :: Relation -> IO [RelationTuple]
- imageRelationFor :: RelationTuple -> Relation -> Either RelationalError Relation
- typesAsRelation :: TypeConstructorMapping -> Either RelationalError Relation
- relationVariablesAsRelation :: Map RelVarName Relation -> Either RelationalError Relation
- randomizeTupleOrder :: MonadRandom m => Relation -> m Relation
- oneTuple :: Relation -> Maybe RelationTuple
Documentation
attributes :: Relation -> Attributes Source #
attributesForNames :: Set AttributeName -> Relation -> Attributes Source #
mkRelationFromList :: Attributes -> [[Atom]] -> Either RelationalError Relation Source #
rename :: AttributeName -> AttributeName -> Relation -> Either RelationalError Relation Source #
group :: AttributeNames -> AttributeName -> Relation -> Either RelationalError Relation Source #
ungroup :: AttributeName -> Relation -> Either RelationalError Relation Source #
tupleUngroup :: AttributeName -> Attributes -> RelationTuple -> Either RelationalError Relation Source #
type RestrictionFilter = RelationTuple -> Either RelationalError Bool Source #
difference :: Relation -> Relation -> Either RelationalError Relation Source #
Difference takes two relations of the same type and returns a new relation which contains only tuples which appear in the first relation but not the second.
relMap :: (RelationTuple -> Either RelationalError RelationTuple) -> Relation -> Either RelationalError Relation Source #
relMogrify :: (RelationTuple -> Either RelationalError RelationTuple) -> Attributes -> Relation -> Either RelationalError Relation Source #
relFold :: (RelationTuple -> a -> a) -> a -> Relation -> a Source #
toList :: Relation -> IO [RelationTuple] Source #
Generate a randomly-ordered list of tuples from the relation.
typesAsRelation :: TypeConstructorMapping -> Either RelationalError Relation Source #
Return a Relation describing the types in the mapping.
relationVariablesAsRelation :: Map RelVarName Relation -> Either RelationalError Relation Source #
Return a Relation describing the relation variables.
randomizeTupleOrder :: MonadRandom m => Relation -> m Relation Source #
Randomly resort the tuples. This is useful for emphasizing that two relations are equal even when they are printed to the console in different orders.