project-m36-0.9.6: Relational Algebra Engine
Safe HaskellNone
LanguageHaskell2010

ProjectM36.Base

Synopsis

Documentation

data Atom Source #

Database atoms are the smallest, undecomposable units of a tuple. Common examples are integers, text, or unique identity keys.

Instances

Instances details
Eq Atom Source # 
Instance details

Defined in ProjectM36.Base

Methods

(==) :: Atom -> Atom -> Bool #

(/=) :: Atom -> Atom -> Bool #

Read Atom Source # 
Instance details

Defined in ProjectM36.Base

Show Atom Source # 
Instance details

Defined in ProjectM36.Base

Methods

showsPrec :: Int -> Atom -> ShowS #

show :: Atom -> String #

showList :: [Atom] -> ShowS #

Generic Atom Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep Atom :: Type -> Type #

Methods

from :: Atom -> Rep Atom x #

to :: Rep Atom x -> Atom #

Hashable Atom Source # 
Instance details

Defined in ProjectM36.Base

Methods

hashWithSalt :: Int -> Atom -> Int #

hash :: Atom -> Int #

NFData Atom Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: Atom -> () #

Serialise Atom Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes DatabaseContextFunction Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes AtomFunction Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes DatabaseContextFunctions Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes AtomFunctions Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes Atom Source # 
Instance details

Defined in ProjectM36.HashSecurely

Methods

hashBytes :: Atom -> Ctx -> Ctx Source #

type Rep Atom Source # 
Instance details

Defined in ProjectM36.Base

type Rep Atom = D1 ('MetaData "Atom" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) (((C1 ('MetaCons "IntegerAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)) :+: (C1 ('MetaCons "IntAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "ScientificAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Scientific)))) :+: (C1 ('MetaCons "DoubleAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)) :+: (C1 ('MetaCons "TextAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "DayAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Day))))) :+: ((C1 ('MetaCons "DateTimeAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UTCTime)) :+: (C1 ('MetaCons "ByteStringAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString)) :+: C1 ('MetaCons "BoolAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)))) :+: ((C1 ('MetaCons "UUIDAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UUID)) :+: C1 ('MetaCons "RelationAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Relation))) :+: (C1 ('MetaCons "RelationalExprAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RelationalExpr)) :+: C1 ('MetaCons "ConstructedAtom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataConstructorName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AtomType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Atom])))))))

data AtomType Source #

The AtomType uniquely identifies the type of a atom.

Instances

Instances details
Eq AtomType Source # 
Instance details

Defined in ProjectM36.Base

Ord AtomType Source # 
Instance details

Defined in ProjectM36.Base

Read AtomType Source # 
Instance details

Defined in ProjectM36.Base

Show AtomType Source # 
Instance details

Defined in ProjectM36.Base

Generic AtomType Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep AtomType :: Type -> Type #

Methods

from :: AtomType -> Rep AtomType x #

to :: Rep AtomType x -> AtomType #

Hashable AtomType Source # 
Instance details

Defined in ProjectM36.Base

Methods

hashWithSalt :: Int -> AtomType -> Int #

hash :: AtomType -> Int #

NFData AtomType Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: AtomType -> () #

Serialise AtomType Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes AtomType Source # 
Instance details

Defined in ProjectM36.HashSecurely

Methods

hashBytes :: AtomType -> Ctx -> Ctx Source #

type Rep AtomType Source # 
Instance details

Defined in ProjectM36.Base

type Rep AtomType = D1 ('MetaData "AtomType" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) (((C1 ('MetaCons "IntAtomType" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IntegerAtomType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ScientificAtomType" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DoubleAtomType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TextAtomType" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DayAtomType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DateTimeAtomType" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ByteStringAtomType" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BoolAtomType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UUIDAtomType" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "RelationAtomType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Attributes)) :+: C1 ('MetaCons "ConstructedAtomType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeConstructorName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeVarMap))) :+: (C1 ('MetaCons "RelationalExprAtomType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeVariableType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeVarName))))))

isRelationAtomType :: AtomType -> Bool Source #

Return True iff the atom type argument is relation-valued. If True, this indicates that the Atom contains a relation.

type AttributeName = StringType Source #

The AttributeName is the name of an attribute in a relation.

data Attribute Source #

A relation's type is composed of attribute names and types.

Instances

Instances details
Eq Attribute Source # 
Instance details

Defined in ProjectM36.Base

Read Attribute Source # 
Instance details

Defined in ProjectM36.Base

Show Attribute Source # 
Instance details

Defined in ProjectM36.Base

Generic Attribute Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep Attribute :: Type -> Type #

Hashable Attribute Source # 
Instance details

Defined in ProjectM36.Base

NFData Attribute Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: Attribute -> () #

Serialise Attribute Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes Attribute Source # 
Instance details

Defined in ProjectM36.HashSecurely

Methods

hashBytes :: Attribute -> Ctx -> Ctx Source #

type Rep Attribute Source # 
Instance details

Defined in ProjectM36.Base

newtype Attributes Source #

Attributes represent the head of a relation.

Constructors

Attributes 

Instances

Instances details
Eq Attributes Source # 
Instance details

Defined in ProjectM36.Base

Read Attributes Source # 
Instance details

Defined in ProjectM36.Base

Show Attributes Source # 
Instance details

Defined in ProjectM36.Base

Generic Attributes Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep Attributes :: Type -> Type #

Semigroup Attributes Source # 
Instance details

Defined in ProjectM36.Attribute

Monoid Attributes Source # 
Instance details

Defined in ProjectM36.Attribute

Hashable Attributes Source # 
Instance details

Defined in ProjectM36.Base

NFData Attributes Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: Attributes -> () #

Serialise Attributes Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes Attributes Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep Attributes Source # 
Instance details

Defined in ProjectM36.Base

type Rep Attributes = D1 ('MetaData "Attributes" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'True) (C1 ('MetaCons "Attributes" 'PrefixI 'True) (S1 ('MetaSel ('Just "attributesVec") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Attribute))))

newtype RelationTupleSet Source #

The relation's tuple set is the body of the relation.

Constructors

RelationTupleSet 

Fields

Instances

Instances details
Eq RelationTupleSet Source # 
Instance details

Defined in ProjectM36.Base

Read RelationTupleSet Source # 
Instance details

Defined in ProjectM36.Base

Show RelationTupleSet Source # 
Instance details

Defined in ProjectM36.Base

Generic RelationTupleSet Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep RelationTupleSet :: Type -> Type #

Hashable RelationTupleSet Source # 
Instance details

Defined in ProjectM36.Base

NFData RelationTupleSet Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: RelationTupleSet -> () #

Serialise RelationTupleSet Source #

A special instance of Serialise which cuts down on duplicate attributes- we should only serialise the attributes at the top-level and not duplicate them per tuple. If we have an empty tupleset, we lack all attributes which is fine in this case.

Instance details

Defined in ProjectM36.Serialise.Base

HashBytes RelationTupleSet Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep RelationTupleSet Source # 
Instance details

Defined in ProjectM36.Base

type Rep RelationTupleSet = D1 ('MetaData "RelationTupleSet" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'True) (C1 ('MetaCons "RelationTupleSet" 'PrefixI 'True) (S1 ('MetaSel ('Just "asList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [RelationTuple])))

data RelationTuple Source #

A tuple is a set of attributes mapped to their Atom values.

Instances

Instances details
Eq RelationTuple Source # 
Instance details

Defined in ProjectM36.Base

Read RelationTuple Source # 
Instance details

Defined in ProjectM36.Base

Show RelationTuple Source # 
Instance details

Defined in ProjectM36.Base

Generic RelationTuple Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep RelationTuple :: Type -> Type #

Hashable RelationTuple Source # 
Instance details

Defined in ProjectM36.Base

NFData RelationTuple Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: RelationTuple -> () #

Serialise RelationTuple Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes RelationTuple Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep RelationTuple Source # 
Instance details

Defined in ProjectM36.Base

type Rep RelationTuple = D1 ('MetaData "RelationTuple" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) (C1 ('MetaCons "RelationTuple" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Attributes) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Atom))))

data Relation Source #

Instances

Instances details
Eq Relation Source # 
Instance details

Defined in ProjectM36.Base

Read Relation Source # 
Instance details

Defined in ProjectM36.Base

Show Relation Source # 
Instance details

Defined in ProjectM36.Base

Generic Relation Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep Relation :: Type -> Type #

Methods

from :: Relation -> Rep Relation x #

to :: Rep Relation x -> Relation #

Hashable Relation Source # 
Instance details

Defined in ProjectM36.Base

Methods

hashWithSalt :: Int -> Relation -> Int #

hash :: Relation -> Int #

NFData Relation Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: Relation -> () #

Serialise Relation Source #

A special instance of Serialise which cuts down on duplicate attributes- we should only serialise the attributes at the top-level and not duplicate them per tuple.

Instance details

Defined in ProjectM36.Serialise.Base

HashBytes Relation Source # 
Instance details

Defined in ProjectM36.HashSecurely

Methods

hashBytes :: Relation -> Ctx -> Ctx Source #

HashBytes (Map RelVarName Relation) Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep Relation Source # 
Instance details

Defined in ProjectM36.Base

data RelationCardinality Source #

Used to represent the number of tuples in a relation.

Constructors

Countable 
Finite Int 

Instances

Instances details
Eq RelationCardinality Source # 
Instance details

Defined in ProjectM36.Base

Ord RelationCardinality Source # 
Instance details

Defined in ProjectM36.Base

Show RelationCardinality Source # 
Instance details

Defined in ProjectM36.Base

Generic RelationCardinality Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep RelationCardinality :: Type -> Type #

Serialise RelationCardinality Source # 
Instance details

Defined in ProjectM36.Serialise.Base

type Rep RelationCardinality Source # 
Instance details

Defined in ProjectM36.Base

type Rep RelationCardinality = D1 ('MetaData "RelationCardinality" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) (C1 ('MetaCons "Countable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Finite" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

type RelVarName = StringType Source #

Relation variables are identified by their names.

data RelationalExprBase a Source #

A relational expression represents query (read) operations on a database.

Instances

Instances details
Functor RelationalExprBase Source # 
Instance details

Defined in ProjectM36.Base

Foldable RelationalExprBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

fold :: Monoid m => RelationalExprBase m -> m #

foldMap :: Monoid m => (a -> m) -> RelationalExprBase a -> m #

foldMap' :: Monoid m => (a -> m) -> RelationalExprBase a -> m #

foldr :: (a -> b -> b) -> b -> RelationalExprBase a -> b #

foldr' :: (a -> b -> b) -> b -> RelationalExprBase a -> b #

foldl :: (b -> a -> b) -> b -> RelationalExprBase a -> b #

foldl' :: (b -> a -> b) -> b -> RelationalExprBase a -> b #

foldr1 :: (a -> a -> a) -> RelationalExprBase a -> a #

foldl1 :: (a -> a -> a) -> RelationalExprBase a -> a #

toList :: RelationalExprBase a -> [a] #

null :: RelationalExprBase a -> Bool #

length :: RelationalExprBase a -> Int #

elem :: Eq a => a -> RelationalExprBase a -> Bool #

maximum :: Ord a => RelationalExprBase a -> a #

minimum :: Ord a => RelationalExprBase a -> a #

sum :: Num a => RelationalExprBase a -> a #

product :: Num a => RelationalExprBase a -> a #

Traversable RelationalExprBase Source # 
Instance details

Defined in ProjectM36.Base

Hashable RelationalExpr Source # 
Instance details

Defined in ProjectM36.Base

ResolveGraphRefTransactionMarker GraphRefRelationalExpr Source # 
Instance details

Defined in ProjectM36.RelationalExpression

Morph RelationalExpr Source # 
Instance details

Defined in ProjectM36.IsomorphicSchema

HashBytes RelationVariables Source # 
Instance details

Defined in ProjectM36.HashSecurely

KnownSymbol x => IsLabel x RelationalExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Convertible RelationalExpr AtomExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Convertible RelationalExpr RestrictionPredicateExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Convertible RelVarName RelationalExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Eq a => Eq (RelationalExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Read a => Read (RelationalExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Show a => Show (RelationalExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Generic (RelationalExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (RelationalExprBase a) :: Type -> Type #

NFData a => NFData (RelationalExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: RelationalExprBase a -> () #

Recursive (RelationalExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Corecursive (RelationalExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Serialise a => Serialise (RelationalExprBase a) Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes a => HashBytes (RelationalExprBase a) Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep (RelationalExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

type Rep (RelationalExprBase a) = D1 ('MetaData "RelationalExprBase" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) ((((C1 ('MetaCons "MakeRelationFromExprs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [AttributeExprBase a])) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TupleExprsBase a))) :+: C1 ('MetaCons "MakeStaticRelation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Attributes) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelationTupleSet))) :+: (C1 ('MetaCons "ExistingRelation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Relation)) :+: C1 ('MetaCons "RelationVariable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelVarName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))) :+: ((C1 ('MetaCons "Project" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AttributeNamesBase a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a))) :+: C1 ('MetaCons "Union" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a)))) :+: (C1 ('MetaCons "Join" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a))) :+: C1 ('MetaCons "Rename" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AttributeName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AttributeName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a))))))) :+: (((C1 ('MetaCons "Difference" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a))) :+: C1 ('MetaCons "Group" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AttributeNamesBase a)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AttributeName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a))))) :+: (C1 ('MetaCons "Ungroup" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AttributeName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a))) :+: C1 ('MetaCons "Restrict" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RestrictionPredicateExprBase a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a))))) :+: ((C1 ('MetaCons "Equals" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a))) :+: C1 ('MetaCons "NotEquals" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a)))) :+: (C1 ('MetaCons "Extend" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ExtendTupleExprBase a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a))) :+: C1 ('MetaCons "With" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(WithNameExprBase a, RelationalExprBase a)]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a)))))))
type Base (RelationalExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

data WithNameExprBase a Source #

Constructors

WithNameExpr RelVarName a 

Instances

Instances details
Functor WithNameExprBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

fmap :: (a -> b) -> WithNameExprBase a -> WithNameExprBase b #

(<$) :: a -> WithNameExprBase b -> WithNameExprBase a #

Foldable WithNameExprBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

fold :: Monoid m => WithNameExprBase m -> m #

foldMap :: Monoid m => (a -> m) -> WithNameExprBase a -> m #

foldMap' :: Monoid m => (a -> m) -> WithNameExprBase a -> m #

foldr :: (a -> b -> b) -> b -> WithNameExprBase a -> b #

foldr' :: (a -> b -> b) -> b -> WithNameExprBase a -> b #

foldl :: (b -> a -> b) -> b -> WithNameExprBase a -> b #

foldl' :: (b -> a -> b) -> b -> WithNameExprBase a -> b #

foldr1 :: (a -> a -> a) -> WithNameExprBase a -> a #

foldl1 :: (a -> a -> a) -> WithNameExprBase a -> a #

toList :: WithNameExprBase a -> [a] #

null :: WithNameExprBase a -> Bool #

length :: WithNameExprBase a -> Int #

elem :: Eq a => a -> WithNameExprBase a -> Bool #

maximum :: Ord a => WithNameExprBase a -> a #

minimum :: Ord a => WithNameExprBase a -> a #

sum :: Num a => WithNameExprBase a -> a #

product :: Num a => WithNameExprBase a -> a #

Traversable WithNameExprBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

traverse :: Applicative f => (a -> f b) -> WithNameExprBase a -> f (WithNameExprBase b) #

sequenceA :: Applicative f => WithNameExprBase (f a) -> f (WithNameExprBase a) #

mapM :: Monad m => (a -> m b) -> WithNameExprBase a -> m (WithNameExprBase b) #

sequence :: Monad m => WithNameExprBase (m a) -> m (WithNameExprBase a) #

ResolveGraphRefTransactionMarker GraphRefWithNameExpr Source # 
Instance details

Defined in ProjectM36.RelationalExpression

Eq a => Eq (WithNameExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Read a => Read (WithNameExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Show a => Show (WithNameExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Generic (WithNameExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (WithNameExprBase a) :: Type -> Type #

Hashable a => Hashable (WithNameExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

NFData a => NFData (WithNameExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: WithNameExprBase a -> () #

Serialise a => Serialise (WithNameExprBase a) Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes a => HashBytes (WithNameExprBase a) Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep (WithNameExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

type Rep (WithNameExprBase a) = D1 ('MetaData "WithNameExprBase" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) (C1 ('MetaCons "WithNameExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelVarName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

data Notification Source #

When the changeExpr returns a different result in the database context, then the reportExpr is triggered and sent asynchronously to all clients.

Instances

Instances details
Eq Notification Source # 
Instance details

Defined in ProjectM36.Base

Show Notification Source # 
Instance details

Defined in ProjectM36.Base

Generic Notification Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep Notification :: Type -> Type #

NFData Notification Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: Notification -> () #

Serialise Notification Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes Notification Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes Notifications Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep Notification Source # 
Instance details

Defined in ProjectM36.Base

type Rep Notification = D1 ('MetaData "Notification" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) (C1 ('MetaCons "Notification" 'PrefixI 'True) (S1 ('MetaSel ('Just "changeExpr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelationalExpr) :*: (S1 ('MetaSel ('Just "reportOldExpr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelationalExpr) :*: S1 ('MetaSel ('Just "reportNewExpr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelationalExpr))))

data TypeConstructorDef Source #

Metadata definition for type constructors such as data Either a b.

Instances

Instances details
Eq TypeConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

Read TypeConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

Show TypeConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

Generic TypeConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep TypeConstructorDef :: Type -> Type #

Hashable TypeConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

NFData TypeConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: TypeConstructorDef -> () #

Serialise TypeConstructorDef Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes TypeConstructorMapping Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes TypeConstructorDef Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep TypeConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

type TypeConstructor = TypeConstructorBase () Source #

Found in data constructors and type declarations: Left (Either Int Text) | Right Int

data TypeConstructorBase a Source #

Instances

Instances details
HashBytes TypeConstructor Source # 
Instance details

Defined in ProjectM36.HashSecurely

Eq a => Eq (TypeConstructorBase a) Source # 
Instance details

Defined in ProjectM36.Base

Read a => Read (TypeConstructorBase a) Source # 
Instance details

Defined in ProjectM36.Base

Show a => Show (TypeConstructorBase a) Source # 
Instance details

Defined in ProjectM36.Base

Generic (TypeConstructorBase a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (TypeConstructorBase a) :: Type -> Type #

Hashable a => Hashable (TypeConstructorBase a) Source # 
Instance details

Defined in ProjectM36.Base

NFData a => NFData (TypeConstructorBase a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: TypeConstructorBase a -> () #

Serialise a => Serialise (TypeConstructorBase a) Source # 
Instance details

Defined in ProjectM36.Serialise.Base

type Rep (TypeConstructorBase a) Source # 
Instance details

Defined in ProjectM36.Base

data DataConstructorDef Source #

Used to define a data constructor in a type constructor context such as Left a | Right b

Instances

Instances details
Eq DataConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

Read DataConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

Show DataConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

Generic DataConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep DataConstructorDef :: Type -> Type #

Hashable DataConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

NFData DataConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: DataConstructorDef -> () #

Serialise DataConstructorDef Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes DataConstructorDef Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes TypeConstructorMapping Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes [DataConstructorDef] Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep DataConstructorDef Source # 
Instance details

Defined in ProjectM36.Base

data DataConstructorDefArg Source #

Instances

Instances details
Eq DataConstructorDefArg Source # 
Instance details

Defined in ProjectM36.Base

Read DataConstructorDefArg Source # 
Instance details

Defined in ProjectM36.Base

Show DataConstructorDefArg Source # 
Instance details

Defined in ProjectM36.Base

Generic DataConstructorDefArg Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep DataConstructorDefArg :: Type -> Type #

Hashable DataConstructorDefArg Source # 
Instance details

Defined in ProjectM36.Base

NFData DataConstructorDefArg Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: DataConstructorDefArg -> () #

Serialise DataConstructorDefArg Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes DataConstructorDefArg Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep DataConstructorDefArg Source # 
Instance details

Defined in ProjectM36.Base

type Rep DataConstructorDefArg = D1 ('MetaData "DataConstructorDefArg" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) (C1 ('MetaCons "DataConstructorDefTypeConstructorArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeConstructor)) :+: C1 ('MetaCons "DataConstructorDefTypeVarNameArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeVarName)))

data GraphRefTransactionMarker Source #

Instances

Instances details
Eq GraphRefTransactionMarker Source # 
Instance details

Defined in ProjectM36.Base

Ord GraphRefTransactionMarker Source # 
Instance details

Defined in ProjectM36.Base

Show GraphRefTransactionMarker Source # 
Instance details

Defined in ProjectM36.Base

Generic GraphRefTransactionMarker Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep GraphRefTransactionMarker :: Type -> Type #

NFData GraphRefTransactionMarker Source # 
Instance details

Defined in ProjectM36.Base

Serialise GraphRefTransactionMarker Source # 
Instance details

Defined in ProjectM36.Serialise.Base

ResolveGraphRefTransactionMarker GraphRefTupleExprs Source # 
Instance details

Defined in ProjectM36.RelationalExpression

ResolveGraphRefTransactionMarker GraphRefTupleExpr Source # 
Instance details

Defined in ProjectM36.RelationalExpression

ResolveGraphRefTransactionMarker GraphRefAttributeNames Source # 
Instance details

Defined in ProjectM36.RelationalExpression

ResolveGraphRefTransactionMarker GraphRefExtendTupleExpr Source # 
Instance details

Defined in ProjectM36.RelationalExpression

ResolveGraphRefTransactionMarker GraphRefAtomExpr Source # 
Instance details

Defined in ProjectM36.RelationalExpression

ResolveGraphRefTransactionMarker GraphRefRestrictionPredicateExpr Source # 
Instance details

Defined in ProjectM36.RelationalExpression

ResolveGraphRefTransactionMarker GraphRefRelationalExpr Source # 
Instance details

Defined in ProjectM36.RelationalExpression

ResolveGraphRefTransactionMarker GraphRefWithNameExpr Source # 
Instance details

Defined in ProjectM36.RelationalExpression

HashBytes GraphRefTransactionMarker Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes RelationVariables Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep GraphRefTransactionMarker Source # 
Instance details

Defined in ProjectM36.Base

type Rep GraphRefTransactionMarker = D1 ('MetaData "GraphRefTransactionMarker" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) (C1 ('MetaCons "TransactionMarker" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TransactionId)) :+: C1 ('MetaCons "UncommittedContextMarker" 'PrefixI 'False) (U1 :: Type -> Type))

data Schemas Source #

Every transaction has one concrete database context and any number of isomorphic subschemas.

Instances

Instances details
Generic Schemas Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep Schemas :: Type -> Type #

Methods

from :: Schemas -> Rep Schemas x #

to :: Rep Schemas x -> Schemas #

type Rep Schemas Source # 
Instance details

Defined in ProjectM36.Base

newtype Schema Source #

The DatabaseContext is a snapshot of a database's evolving state and contains everything a database client can change over time. I spent some time thinking about whether the VirtualDatabaseContext/Schema and DatabaseContext data constructors should be the same constructor, but that would allow relation variables to be created in a "virtual" context which would appear to defeat the isomorphisms of the contexts. It should be possible to switch to an alternative schema to view the same equivalent information without information loss. However, allowing all contexts to reference another context while maintaining its own relation variables, new types, etc. could be interesting from a security perspective. For example, if a user creates a new relvar in a virtual context, then does it necessarily appear in all linked contexts? After deliberation, I think the relvar should appear in *all* linked contexts to retain the isomorphic properties, even when the isomorphism is for a subset of the context. This hints that the IsoMorphs should allow for "fall-through"; that is, when a relvar is not defined in the virtual context (for morphing), then the lookup should fall through to the underlying context.

Constructors

Schema SchemaIsomorphs 

Instances

Instances details
Generic Schema Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep Schema :: Type -> Type #

Methods

from :: Schema -> Rep Schema x #

to :: Rep Schema x -> Schema #

Serialise Schema Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes Schema Source # 
Instance details

Defined in ProjectM36.HashSecurely

Methods

hashBytes :: Schema -> Ctx -> Ctx Source #

type Rep Schema Source # 
Instance details

Defined in ProjectM36.Base

type Rep Schema = D1 ('MetaData "Schema" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'True) (C1 ('MetaCons "Schema" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SchemaIsomorphs)))

data SchemaIsomorph Source #

Instances

Instances details
Show SchemaIsomorph Source # 
Instance details

Defined in ProjectM36.Base

Generic SchemaIsomorph Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep SchemaIsomorph :: Type -> Type #

Serialise SchemaIsomorph Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes SchemaIsomorph Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep SchemaIsomorph Source # 
Instance details

Defined in ProjectM36.Base

data DatabaseContext Source #

Instances

Instances details
Generic DatabaseContext Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep DatabaseContext :: Type -> Type #

NFData DatabaseContext Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: DatabaseContext -> () #

HashBytes DatabaseContextFunction Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes DatabaseContextFunctions Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes DatabaseContext Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep DatabaseContext Source # 
Instance details

Defined in ProjectM36.Base

data InclusionDependency Source #

Inclusion dependencies represent every possible database constraint. Constraints enforce specific, arbitrarily-complex rules to which the database context's relation variables must adhere unconditionally.

Instances

Instances details
Eq InclusionDependency Source # 
Instance details

Defined in ProjectM36.Base

Read InclusionDependency Source # 
Instance details

Defined in ProjectM36.Base

Show InclusionDependency Source # 
Instance details

Defined in ProjectM36.Base

Generic InclusionDependency Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep InclusionDependency :: Type -> Type #

Hashable InclusionDependency Source # 
Instance details

Defined in ProjectM36.Base

NFData InclusionDependency Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: InclusionDependency -> () #

Serialise InclusionDependency Source # 
Instance details

Defined in ProjectM36.Serialise.Base

Morph InclusionDependency Source #

The names of inclusion dependencies might leak context about a different schema, but that's arbitrary and cannot be altered without having the user provide a renaming function or a new set of incDep names- seems extraneous.

Instance details

Defined in ProjectM36.IsomorphicSchema

Morph InclusionDependencies Source # 
Instance details

Defined in ProjectM36.IsomorphicSchema

HashBytes InclusionDependency Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes InclusionDependencies Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep InclusionDependency Source # 
Instance details

Defined in ProjectM36.Base

type Rep InclusionDependency = D1 ('MetaData "InclusionDependency" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) (C1 ('MetaCons "InclusionDependency" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelationalExpr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelationalExpr)))

data DatabaseContextExprBase a Source #

Database context expressions modify the database context.

Instances

Instances details
Hashable DatabaseContextExpr Source # 
Instance details

Defined in ProjectM36.Base

Eq a => Eq (DatabaseContextExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Read a => Read (DatabaseContextExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Show a => Show (DatabaseContextExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Generic (DatabaseContextExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (DatabaseContextExprBase a) :: Type -> Type #

NFData a => NFData (DatabaseContextExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: DatabaseContextExprBase a -> () #

Serialise a => Serialise (DatabaseContextExprBase a) Source # 
Instance details

Defined in ProjectM36.Serialise.Base

type Rep (DatabaseContextExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

type Rep (DatabaseContextExprBase a) = D1 ('MetaData "DatabaseContextExprBase" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) ((((C1 ('MetaCons "NoOperation" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Define" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelVarName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AttributeExprBase a]))) :+: (C1 ('MetaCons "Undefine" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelVarName)) :+: C1 ('MetaCons "Assign" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelVarName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a))))) :+: ((C1 ('MetaCons "Insert" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelVarName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a))) :+: C1 ('MetaCons "Delete" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelVarName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RestrictionPredicateExprBase a)))) :+: (C1 ('MetaCons "Update" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelVarName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AttributeNameAtomExprMap) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RestrictionPredicateExprBase a)))) :+: (C1 ('MetaCons "AddInclusionDependency" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IncDepName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InclusionDependency)) :+: C1 ('MetaCons "RemoveInclusionDependency" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IncDepName)))))) :+: (((C1 ('MetaCons "AddNotification" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NotificationName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelationalExpr)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelationalExpr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelationalExpr))) :+: C1 ('MetaCons "RemoveNotification" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NotificationName))) :+: (C1 ('MetaCons "AddTypeConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeConstructorDef) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DataConstructorDef])) :+: (C1 ('MetaCons "RemoveTypeConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeConstructorName)) :+: C1 ('MetaCons "RemoveAtomFunction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FunctionName))))) :+: ((C1 ('MetaCons "RemoveDatabaseContextFunction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FunctionName)) :+: C1 ('MetaCons "ExecuteDatabaseContextFunction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FunctionName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AtomExprBase a]))) :+: (C1 ('MetaCons "AddRegisteredQuery" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RegisteredQueryName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelationalExpr)) :+: (C1 ('MetaCons "RemoveRegisteredQuery" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RegisteredQueryName)) :+: C1 ('MetaCons "MultipleExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DatabaseContextExprBase a])))))))

type Range = (Int, Int) Source #

data DatabaseContextIOExprBase a Source #

Adding an atom function should be nominally a DatabaseExpr except for the fact that it cannot be performed purely. Thus, we create the DatabaseContextIOExpr.

Instances

Instances details
Eq a => Eq (DatabaseContextIOExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Show a => Show (DatabaseContextIOExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Generic (DatabaseContextIOExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (DatabaseContextIOExprBase a) :: Type -> Type #

Serialise a => Serialise (DatabaseContextIOExprBase a) Source # 
Instance details

Defined in ProjectM36.Serialise.Base

type Rep (DatabaseContextIOExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

type Rep (DatabaseContextIOExprBase a) = D1 ('MetaData "DatabaseContextIOExprBase" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) ((C1 ('MetaCons "AddAtomFunction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FunctionName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TypeConstructor]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FunctionBodyScript))) :+: C1 ('MetaCons "LoadAtomFunctions" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ObjModuleName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ObjFunctionName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))) :+: (C1 ('MetaCons "AddDatabaseContextFunction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FunctionName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TypeConstructor]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FunctionBodyScript))) :+: (C1 ('MetaCons "LoadDatabaseContextFunctions" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ObjModuleName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ObjFunctionName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath))) :+: C1 ('MetaCons "CreateArbitraryRelation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelVarName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AttributeExprBase a]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Range))))))

data RestrictionPredicateExprBase a Source #

Restriction predicates are boolean algebra components which, when composed, indicate whether or not a tuple should be retained during a restriction (filtering) operation.

Instances

Instances details
Functor RestrictionPredicateExprBase Source # 
Instance details

Defined in ProjectM36.Base

Foldable RestrictionPredicateExprBase Source # 
Instance details

Defined in ProjectM36.Base

Traversable RestrictionPredicateExprBase Source # 
Instance details

Defined in ProjectM36.Base

Hashable RestrictionPredicateExpr Source # 
Instance details

Defined in ProjectM36.Base

ResolveGraphRefTransactionMarker GraphRefRestrictionPredicateExpr Source # 
Instance details

Defined in ProjectM36.RelationalExpression

Atomable a => Convertible a RestrictionPredicateExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Convertible AtomExpr RestrictionPredicateExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Convertible RestrictionPredicateExpr RestrictionPredicateExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Convertible RelationalExpr RestrictionPredicateExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Eq a => Eq (RestrictionPredicateExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Read a => Read (RestrictionPredicateExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Show a => Show (RestrictionPredicateExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Generic (RestrictionPredicateExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (RestrictionPredicateExprBase a) :: Type -> Type #

NFData a => NFData (RestrictionPredicateExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Serialise a => Serialise (RestrictionPredicateExprBase a) Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes a => HashBytes (RestrictionPredicateExprBase a) Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep (RestrictionPredicateExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

type Rep (RestrictionPredicateExprBase a) = D1 ('MetaData "RestrictionPredicateExprBase" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) ((C1 ('MetaCons "TruePredicate" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AndPredicate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RestrictionPredicateExprBase a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RestrictionPredicateExprBase a))) :+: C1 ('MetaCons "OrPredicate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RestrictionPredicateExprBase a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RestrictionPredicateExprBase a))))) :+: ((C1 ('MetaCons "NotPredicate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RestrictionPredicateExprBase a))) :+: C1 ('MetaCons "RelationalExprPredicate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RelationalExprBase a)))) :+: (C1 ('MetaCons "AtomExprPredicate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AtomExprBase a))) :+: C1 ('MetaCons "AttributeEqualityPredicate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AttributeName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AtomExprBase a))))))

type HeadName = StringType Source #

A transaction graph's head name references the leaves of the transaction graph and can be used during session creation to indicate at which point in the graph commits should persist.

data TransactionGraph Source #

The transaction graph is the global database's state which references every committed transaction.

Instances

Instances details
Generic TransactionGraph Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep TransactionGraph :: Type -> Type #

type Rep TransactionGraph Source # 
Instance details

Defined in ProjectM36.Base

data TransactionInfo Source #

Every transaction has context-specific information attached to it. The TransactionDiffs represent child/edge relationships to previous transactions (branches or continuations of the same branch).

type TransactionId = UUID Source #

Every set of modifications made to the database are atomically committed to the transaction graph as a transaction.

data DisconnectedTransaction Source #

The disconnected transaction represents an in-progress workspace used by sessions before changes are committed. This is similar to git's "index". After a transaction is committed, it is "connected" in the transaction graph and can no longer be modified.

data AtomExprBase a Source #

An atom expression represents an action to take when extending a relation or when statically defining a relation or a new tuple.

Instances

Instances details
Functor AtomExprBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

fmap :: (a -> b) -> AtomExprBase a -> AtomExprBase b #

(<$) :: a -> AtomExprBase b -> AtomExprBase a #

Foldable AtomExprBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

fold :: Monoid m => AtomExprBase m -> m #

foldMap :: Monoid m => (a -> m) -> AtomExprBase a -> m #

foldMap' :: Monoid m => (a -> m) -> AtomExprBase a -> m #

foldr :: (a -> b -> b) -> b -> AtomExprBase a -> b #

foldr' :: (a -> b -> b) -> b -> AtomExprBase a -> b #

foldl :: (b -> a -> b) -> b -> AtomExprBase a -> b #

foldl' :: (b -> a -> b) -> b -> AtomExprBase a -> b #

foldr1 :: (a -> a -> a) -> AtomExprBase a -> a #

foldl1 :: (a -> a -> a) -> AtomExprBase a -> a #

toList :: AtomExprBase a -> [a] #

null :: AtomExprBase a -> Bool #

length :: AtomExprBase a -> Int #

elem :: Eq a => a -> AtomExprBase a -> Bool #

maximum :: Ord a => AtomExprBase a -> a #

minimum :: Ord a => AtomExprBase a -> a #

sum :: Num a => AtomExprBase a -> a #

product :: Num a => AtomExprBase a -> a #

Traversable AtomExprBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

traverse :: Applicative f => (a -> f b) -> AtomExprBase a -> f (AtomExprBase b) #

sequenceA :: Applicative f => AtomExprBase (f a) -> f (AtomExprBase a) #

mapM :: Monad m => (a -> m b) -> AtomExprBase a -> m (AtomExprBase b) #

sequence :: Monad m => AtomExprBase (m a) -> m (AtomExprBase a) #

Hashable AtomExpr Source # 
Instance details

Defined in ProjectM36.Base

Methods

hashWithSalt :: Int -> AtomExpr -> Int #

hash :: AtomExpr -> Int #

ResolveGraphRefTransactionMarker GraphRefAtomExpr Source # 
Instance details

Defined in ProjectM36.RelationalExpression

KnownSymbol x => IsLabel x AtomExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Methods

fromLabel :: AtomExpr #

Atomable a => Convertible a AtomExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Convertible AtomExpr AtomExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Convertible AtomExpr RestrictionPredicateExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Convertible RelationalExpr AtomExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Convertible RelVarName AtomExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

(KnownSymbol x, Convertible a AtomExpr) => IsLabel x ([a] -> AtomExpr) Source # 
Instance details

Defined in ProjectM36.Shortcuts

Methods

fromLabel :: [a] -> AtomExpr #

(Convertible a AtomExpr, KnownSymbol x) => IsLabel x (a -> (AttributeName, AtomExpr)) Source # 
Instance details

Defined in ProjectM36.Shortcuts

Methods

fromLabel :: a -> (AttributeName, AtomExpr) #

Eq a => Eq (AtomExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Read a => Read (AtomExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Show a => Show (AtomExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Generic (AtomExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (AtomExprBase a) :: Type -> Type #

Methods

from :: AtomExprBase a -> Rep (AtomExprBase a) x #

to :: Rep (AtomExprBase a) x -> AtomExprBase a #

NFData a => NFData (AtomExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: AtomExprBase a -> () #

Serialise a => Serialise (AtomExprBase a) Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes a => HashBytes (AtomExprBase a) Source # 
Instance details

Defined in ProjectM36.HashSecurely

Methods

hashBytes :: AtomExprBase a -> Ctx -> Ctx Source #

type Rep (AtomExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

data ExtendTupleExprBase a Source #

Used in tuple creation when creating a relation.

Instances

Instances details
Functor ExtendTupleExprBase Source # 
Instance details

Defined in ProjectM36.Base

Foldable ExtendTupleExprBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

fold :: Monoid m => ExtendTupleExprBase m -> m #

foldMap :: Monoid m => (a -> m) -> ExtendTupleExprBase a -> m #

foldMap' :: Monoid m => (a -> m) -> ExtendTupleExprBase a -> m #

foldr :: (a -> b -> b) -> b -> ExtendTupleExprBase a -> b #

foldr' :: (a -> b -> b) -> b -> ExtendTupleExprBase a -> b #

foldl :: (b -> a -> b) -> b -> ExtendTupleExprBase a -> b #

foldl' :: (b -> a -> b) -> b -> ExtendTupleExprBase a -> b #

foldr1 :: (a -> a -> a) -> ExtendTupleExprBase a -> a #

foldl1 :: (a -> a -> a) -> ExtendTupleExprBase a -> a #

toList :: ExtendTupleExprBase a -> [a] #

null :: ExtendTupleExprBase a -> Bool #

length :: ExtendTupleExprBase a -> Int #

elem :: Eq a => a -> ExtendTupleExprBase a -> Bool #

maximum :: Ord a => ExtendTupleExprBase a -> a #

minimum :: Ord a => ExtendTupleExprBase a -> a #

sum :: Num a => ExtendTupleExprBase a -> a #

product :: Num a => ExtendTupleExprBase a -> a #

Traversable ExtendTupleExprBase Source # 
Instance details

Defined in ProjectM36.Base

Hashable ExtendTupleExpr Source # 
Instance details

Defined in ProjectM36.Base

ResolveGraphRefTransactionMarker GraphRefExtendTupleExpr Source # 
Instance details

Defined in ProjectM36.RelationalExpression

(Convertible a AtomExpr, KnownSymbol x) => IsLabel x (a -> ExtendTupleExpr) Source # 
Instance details

Defined in ProjectM36.Shortcuts

Methods

fromLabel :: a -> ExtendTupleExpr #

Eq a => Eq (ExtendTupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Read a => Read (ExtendTupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Show a => Show (ExtendTupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Generic (ExtendTupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (ExtendTupleExprBase a) :: Type -> Type #

NFData a => NFData (ExtendTupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: ExtendTupleExprBase a -> () #

Serialise a => Serialise (ExtendTupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes a => HashBytes (ExtendTupleExprBase a) Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep (ExtendTupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

type Rep (ExtendTupleExprBase a) = D1 ('MetaData "ExtendTupleExprBase" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) (C1 ('MetaCons "AttributeExtendTupleExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AttributeName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AtomExprBase a))))

data AttributeNamesBase a Source #

An AtomFunction has a name, a type, and a function body to execute when called.

The AttributeNames structure represents a set of attribute names or the same set of names but inverted in the context of a relational expression. For example, if a relational expression has attributes named "a", "b", and "c", the InvertedAttributeNames of ("a","c") is ("b").

Instances

Instances details
Functor AttributeNamesBase Source # 
Instance details

Defined in ProjectM36.Base

Foldable AttributeNamesBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

fold :: Monoid m => AttributeNamesBase m -> m #

foldMap :: Monoid m => (a -> m) -> AttributeNamesBase a -> m #

foldMap' :: Monoid m => (a -> m) -> AttributeNamesBase a -> m #

foldr :: (a -> b -> b) -> b -> AttributeNamesBase a -> b #

foldr' :: (a -> b -> b) -> b -> AttributeNamesBase a -> b #

foldl :: (b -> a -> b) -> b -> AttributeNamesBase a -> b #

foldl' :: (b -> a -> b) -> b -> AttributeNamesBase a -> b #

foldr1 :: (a -> a -> a) -> AttributeNamesBase a -> a #

foldl1 :: (a -> a -> a) -> AttributeNamesBase a -> a #

toList :: AttributeNamesBase a -> [a] #

null :: AttributeNamesBase a -> Bool #

length :: AttributeNamesBase a -> Int #

elem :: Eq a => a -> AttributeNamesBase a -> Bool #

maximum :: Ord a => AttributeNamesBase a -> a #

minimum :: Ord a => AttributeNamesBase a -> a #

sum :: Num a => AttributeNamesBase a -> a #

product :: Num a => AttributeNamesBase a -> a #

Traversable AttributeNamesBase Source # 
Instance details

Defined in ProjectM36.Base

Hashable AttributeNames Source # 
Instance details

Defined in ProjectM36.Base

ResolveGraphRefTransactionMarker GraphRefAttributeNames Source # 
Instance details

Defined in ProjectM36.RelationalExpression

IsList (AttributeNamesBase ()) Source # 
Instance details

Defined in ProjectM36.Shortcuts

Associated Types

type Item (AttributeNamesBase ()) #

Eq a => Eq (AttributeNamesBase a) Source # 
Instance details

Defined in ProjectM36.Base

Read a => Read (AttributeNamesBase a) Source # 
Instance details

Defined in ProjectM36.Base

Show a => Show (AttributeNamesBase a) Source # 
Instance details

Defined in ProjectM36.Base

Generic (AttributeNamesBase a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (AttributeNamesBase a) :: Type -> Type #

NFData a => NFData (AttributeNamesBase a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: AttributeNamesBase a -> () #

Serialise a => Serialise (AttributeNamesBase a) Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes a => HashBytes (AttributeNamesBase a) Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep (AttributeNamesBase a) Source # 
Instance details

Defined in ProjectM36.Base

type Item (AttributeNamesBase ()) Source # 
Instance details

Defined in ProjectM36.Shortcuts

data PersistenceStrategy Source #

The persistence strategy is a global database option which represents how to persist the database in the filesystem, if at all.

Constructors

NoPersistence

no filesystem persistence/memory-only database

MinimalPersistence FilePath

fsync off, not crash-safe

CrashSafePersistence FilePath

full fsync to disk (flushes kernel and physical drive buffers to ensure that the transaction is on non-volatile storage)

data AttributeExprBase a Source #

Create attributes dynamically.

Instances

Instances details
Functor AttributeExprBase Source # 
Instance details

Defined in ProjectM36.Base

Foldable AttributeExprBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

fold :: Monoid m => AttributeExprBase m -> m #

foldMap :: Monoid m => (a -> m) -> AttributeExprBase a -> m #

foldMap' :: Monoid m => (a -> m) -> AttributeExprBase a -> m #

foldr :: (a -> b -> b) -> b -> AttributeExprBase a -> b #

foldr' :: (a -> b -> b) -> b -> AttributeExprBase a -> b #

foldl :: (b -> a -> b) -> b -> AttributeExprBase a -> b #

foldl' :: (b -> a -> b) -> b -> AttributeExprBase a -> b #

foldr1 :: (a -> a -> a) -> AttributeExprBase a -> a #

foldl1 :: (a -> a -> a) -> AttributeExprBase a -> a #

toList :: AttributeExprBase a -> [a] #

null :: AttributeExprBase a -> Bool #

length :: AttributeExprBase a -> Int #

elem :: Eq a => a -> AttributeExprBase a -> Bool #

maximum :: Ord a => AttributeExprBase a -> a #

minimum :: Ord a => AttributeExprBase a -> a #

sum :: Num a => AttributeExprBase a -> a #

product :: Num a => AttributeExprBase a -> a #

Traversable AttributeExprBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

traverse :: Applicative f => (a -> f b) -> AttributeExprBase a -> f (AttributeExprBase b) #

sequenceA :: Applicative f => AttributeExprBase (f a) -> f (AttributeExprBase a) #

mapM :: Monad m => (a -> m b) -> AttributeExprBase a -> m (AttributeExprBase b) #

sequence :: Monad m => AttributeExprBase (m a) -> m (AttributeExprBase a) #

(KnownSymbol x, Atomable a) => IsLabel x (HaskAtomType a -> AttributeExpr) Source # 
Instance details

Defined in ProjectM36.Shortcuts

Eq a => Eq (AttributeExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Read a => Read (AttributeExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Show a => Show (AttributeExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Generic (AttributeExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (AttributeExprBase a) :: Type -> Type #

Hashable a => Hashable (AttributeExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

NFData a => NFData (AttributeExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: AttributeExprBase a -> () #

Serialise a => Serialise (AttributeExprBase a) Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes a => HashBytes (Maybe [AttributeExprBase a]) Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes a => HashBytes (AttributeExprBase a) Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Rep (AttributeExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

newtype TupleExprBase a Source #

Dynamically create a tuple from attribute names and AtomExprs.

Instances

Instances details
IsList TupleExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

Associated Types

type Item TupleExpr #

Functor TupleExprBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

fmap :: (a -> b) -> TupleExprBase a -> TupleExprBase b #

(<$) :: a -> TupleExprBase b -> TupleExprBase a #

Foldable TupleExprBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

fold :: Monoid m => TupleExprBase m -> m #

foldMap :: Monoid m => (a -> m) -> TupleExprBase a -> m #

foldMap' :: Monoid m => (a -> m) -> TupleExprBase a -> m #

foldr :: (a -> b -> b) -> b -> TupleExprBase a -> b #

foldr' :: (a -> b -> b) -> b -> TupleExprBase a -> b #

foldl :: (b -> a -> b) -> b -> TupleExprBase a -> b #

foldl' :: (b -> a -> b) -> b -> TupleExprBase a -> b #

foldr1 :: (a -> a -> a) -> TupleExprBase a -> a #

foldl1 :: (a -> a -> a) -> TupleExprBase a -> a #

toList :: TupleExprBase a -> [a] #

null :: TupleExprBase a -> Bool #

length :: TupleExprBase a -> Int #

elem :: Eq a => a -> TupleExprBase a -> Bool #

maximum :: Ord a => TupleExprBase a -> a #

minimum :: Ord a => TupleExprBase a -> a #

sum :: Num a => TupleExprBase a -> a #

product :: Num a => TupleExprBase a -> a #

Traversable TupleExprBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

traverse :: Applicative f => (a -> f b) -> TupleExprBase a -> f (TupleExprBase b) #

sequenceA :: Applicative f => TupleExprBase (f a) -> f (TupleExprBase a) #

mapM :: Monad m => (a -> m b) -> TupleExprBase a -> m (TupleExprBase b) #

sequence :: Monad m => TupleExprBase (m a) -> m (TupleExprBase a) #

Hashable TupleExpr Source # 
Instance details

Defined in ProjectM36.Base

ResolveGraphRefTransactionMarker GraphRefTupleExpr Source # 
Instance details

Defined in ProjectM36.RelationalExpression

Eq a => Eq (TupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Read a => Read (TupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Show a => Show (TupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Generic (TupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (TupleExprBase a) :: Type -> Type #

NFData a => NFData (TupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: TupleExprBase a -> () #

Serialise a => Serialise (TupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes a => HashBytes (TupleExprBase a) Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Item TupleExpr Source # 
Instance details

Defined in ProjectM36.Shortcuts

type Rep (TupleExprBase a) Source # 
Instance details

Defined in ProjectM36.Base

type Rep (TupleExprBase a) = D1 ('MetaData "TupleExprBase" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'True) (C1 ('MetaCons "TupleExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map AttributeName (AtomExprBase a)))))

data TupleExprsBase a Source #

Constructors

TupleExprs a [TupleExprBase a] 

Instances

Instances details
Functor TupleExprsBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

fmap :: (a -> b) -> TupleExprsBase a -> TupleExprsBase b #

(<$) :: a -> TupleExprsBase b -> TupleExprsBase a #

Foldable TupleExprsBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

fold :: Monoid m => TupleExprsBase m -> m #

foldMap :: Monoid m => (a -> m) -> TupleExprsBase a -> m #

foldMap' :: Monoid m => (a -> m) -> TupleExprsBase a -> m #

foldr :: (a -> b -> b) -> b -> TupleExprsBase a -> b #

foldr' :: (a -> b -> b) -> b -> TupleExprsBase a -> b #

foldl :: (b -> a -> b) -> b -> TupleExprsBase a -> b #

foldl' :: (b -> a -> b) -> b -> TupleExprsBase a -> b #

foldr1 :: (a -> a -> a) -> TupleExprsBase a -> a #

foldl1 :: (a -> a -> a) -> TupleExprsBase a -> a #

toList :: TupleExprsBase a -> [a] #

null :: TupleExprsBase a -> Bool #

length :: TupleExprsBase a -> Int #

elem :: Eq a => a -> TupleExprsBase a -> Bool #

maximum :: Ord a => TupleExprsBase a -> a #

minimum :: Ord a => TupleExprsBase a -> a #

sum :: Num a => TupleExprsBase a -> a #

product :: Num a => TupleExprsBase a -> a #

Traversable TupleExprsBase Source # 
Instance details

Defined in ProjectM36.Base

Methods

traverse :: Applicative f => (a -> f b) -> TupleExprsBase a -> f (TupleExprsBase b) #

sequenceA :: Applicative f => TupleExprsBase (f a) -> f (TupleExprsBase a) #

mapM :: Monad m => (a -> m b) -> TupleExprsBase a -> m (TupleExprsBase b) #

sequence :: Monad m => TupleExprsBase (m a) -> m (TupleExprsBase a) #

Hashable TupleExprs Source # 
Instance details

Defined in ProjectM36.Base

ResolveGraphRefTransactionMarker GraphRefTupleExprs Source # 
Instance details

Defined in ProjectM36.RelationalExpression

IsList (TupleExprsBase ()) Source # 
Instance details

Defined in ProjectM36.Shortcuts

Associated Types

type Item (TupleExprsBase ()) #

Eq a => Eq (TupleExprsBase a) Source # 
Instance details

Defined in ProjectM36.Base

Read a => Read (TupleExprsBase a) Source # 
Instance details

Defined in ProjectM36.Base

Show a => Show (TupleExprsBase a) Source # 
Instance details

Defined in ProjectM36.Base

Generic (TupleExprsBase a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (TupleExprsBase a) :: Type -> Type #

NFData a => NFData (TupleExprsBase a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: TupleExprsBase a -> () #

Serialise a => Serialise (TupleExprsBase a) Source # 
Instance details

Defined in ProjectM36.Serialise.Base

HashBytes a => HashBytes (TupleExprsBase a) Source # 
Instance details

Defined in ProjectM36.HashSecurely

type Item TupleExprs Source # 
Instance details

Defined in ProjectM36.Shortcuts

type Rep (TupleExprsBase a) Source # 
Instance details

Defined in ProjectM36.Base

type Rep (TupleExprsBase a) = D1 ('MetaData "TupleExprsBase" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) (C1 ('MetaCons "TupleExprs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TupleExprBase a])))

data MergeStrategy Source #

Constructors

UnionMergeStrategy

After a union merge, the merge transaction is a result of union'ing relvars of the same name, introducing all uniquely-named relvars, union of constraints, union of atom functions, notifications, and types (unless the names and definitions collide, e.g. two types of the same name with different definitions)

UnionPreferMergeStrategy HeadName

Similar to a union merge, but, on conflict, prefer the unmerged section (relvar, function, etc.) from the branch named as the argument.

SelectedBranchMergeStrategy HeadName

Similar to the our/theirs merge strategy in git, the merge transaction's context is identical to that of the last transaction in the selected branch.

Instances

Instances details
Eq MergeStrategy Source # 
Instance details

Defined in ProjectM36.Base

Show MergeStrategy Source # 
Instance details

Defined in ProjectM36.Base

Generic MergeStrategy Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep MergeStrategy :: Type -> Type #

NFData MergeStrategy Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: MergeStrategy -> () #

Serialise MergeStrategy Source # 
Instance details

Defined in ProjectM36.Serialise.Base

type Rep MergeStrategy Source # 
Instance details

Defined in ProjectM36.Base

type Rep MergeStrategy = D1 ('MetaData "MergeStrategy" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) (C1 ('MetaCons "UnionMergeStrategy" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UnionPreferMergeStrategy" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HeadName)) :+: C1 ('MetaCons "SelectedBranchMergeStrategy" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HeadName))))

data Function a Source #

Represents stored, user-created or built-in functions which can operates of types such as Atoms or DatabaseContexts.

Instances

Instances details
HashBytes DatabaseContextFunction Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes AtomFunction Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes DatabaseContextFunctions Source # 
Instance details

Defined in ProjectM36.HashSecurely

HashBytes AtomFunctions Source # 
Instance details

Defined in ProjectM36.HashSecurely

Eq (Function a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

(==) :: Function a -> Function a -> Bool #

(/=) :: Function a -> Function a -> Bool #

Generic (Function a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (Function a) :: Type -> Type #

Methods

from :: Function a -> Rep (Function a) x #

to :: Rep (Function a) x -> Function a #

Hashable (Function a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

hashWithSalt :: Int -> Function a -> Int #

hash :: Function a -> Int #

NFData a => NFData (Function a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: Function a -> () #

type Rep (Function a) Source # 
Instance details

Defined in ProjectM36.Base

type Rep (Function a) = D1 ('MetaData "Function" "ProjectM36.Base" "project-m36-0.9.6-inplace" 'False) (C1 ('MetaCons "Function" 'PrefixI 'True) (S1 ('MetaSel ('Just "funcName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FunctionName) :*: (S1 ('MetaSel ('Just "funcType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AtomType]) :*: S1 ('MetaSel ('Just "funcBody") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FunctionBody a)))))

data FunctionBody a Source #

Instances

Instances details
Generic (FunctionBody a) Source # 
Instance details

Defined in ProjectM36.Base

Associated Types

type Rep (FunctionBody a) :: Type -> Type #

Methods

from :: FunctionBody a -> Rep (FunctionBody a) x #

to :: Rep (FunctionBody a) x -> FunctionBody a #

NFData a => NFData (FunctionBody a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

rnf :: FunctionBody a -> () #

HashBytes (FunctionBody a) Source # 
Instance details

Defined in ProjectM36.HashSecurely

Methods

hashBytes :: FunctionBody a -> Ctx -> Ctx Source #

type Rep (FunctionBody a) Source # 
Instance details

Defined in ProjectM36.Base

data RelationalExprBaseF (a :: Type) r Source #

Instances

Instances details
Functor (RelationalExprBaseF a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

fmap :: (a0 -> b) -> RelationalExprBaseF a a0 -> RelationalExprBaseF a b #

(<$) :: a0 -> RelationalExprBaseF a b -> RelationalExprBaseF a a0 #

Foldable (RelationalExprBaseF a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

fold :: Monoid m => RelationalExprBaseF a m -> m #

foldMap :: Monoid m => (a0 -> m) -> RelationalExprBaseF a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> RelationalExprBaseF a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> RelationalExprBaseF a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> RelationalExprBaseF a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> RelationalExprBaseF a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> RelationalExprBaseF a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> RelationalExprBaseF a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> RelationalExprBaseF a a0 -> a0 #

toList :: RelationalExprBaseF a a0 -> [a0] #

null :: RelationalExprBaseF a a0 -> Bool #

length :: RelationalExprBaseF a a0 -> Int #

elem :: Eq a0 => a0 -> RelationalExprBaseF a a0 -> Bool #

maximum :: Ord a0 => RelationalExprBaseF a a0 -> a0 #

minimum :: Ord a0 => RelationalExprBaseF a a0 -> a0 #

sum :: Num a0 => RelationalExprBaseF a a0 -> a0 #

product :: Num a0 => RelationalExprBaseF a a0 -> a0 #

Traversable (RelationalExprBaseF a) Source # 
Instance details

Defined in ProjectM36.Base

Methods

traverse :: Applicative f => (a0 -> f b) -> RelationalExprBaseF a a0 -> f (RelationalExprBaseF a b) #

sequenceA :: Applicative f => RelationalExprBaseF a (f a0) -> f (RelationalExprBaseF a a0) #

mapM :: Monad m => (a0 -> m b) -> RelationalExprBaseF a a0 -> m (RelationalExprBaseF a b) #

sequence :: Monad m => RelationalExprBaseF a (m a0) -> m (RelationalExprBaseF a a0) #