project-m36-0.5.1: Relational Algebra Engine

Safe HaskellNone
LanguageHaskell2010

ProjectM36.TransactionGraph

Synopsis

Documentation

data TransactionIdLookup Source #

Record a lookup for a specific transaction in the graph.

Instances
Eq TransactionIdLookup Source # 
Instance details

Defined in ProjectM36.TransactionGraph

Show TransactionIdLookup Source # 
Instance details

Defined in ProjectM36.TransactionGraph

Generic TransactionIdLookup Source # 
Instance details

Defined in ProjectM36.TransactionGraph

Associated Types

type Rep TransactionIdLookup :: * -> * #

Binary TransactionIdLookup Source # 
Instance details

Defined in ProjectM36.TransactionGraph

Binary TransGraphAtomExpr # 
Instance details

Defined in ProjectM36.TransGraphRelationalExpression

Binary TransGraphRestrictionPredicateExpr # 
Instance details

Defined in ProjectM36.TransGraphRelationalExpression

Binary TransGraphTupleExpr # 
Instance details

Defined in ProjectM36.TransGraphRelationalExpression

Binary TransGraphExtendTupleExpr # 
Instance details

Defined in ProjectM36.TransGraphRelationalExpression

Binary TransGraphAttributeNames # 
Instance details

Defined in ProjectM36.TransGraphRelationalExpression

Binary TransGraphRelationalExpr # 
Instance details

Defined in ProjectM36.TransGraphRelationalExpression

type Rep TransactionIdLookup Source # 
Instance details

Defined in ProjectM36.TransactionGraph

data TransactionIdHeadBacktrack Source #

Used for git-style head backtracking such as topic~3^2.

Constructors

TransactionIdHeadParentBacktrack Int

git equivalent of ~: walk back n parents, arbitrarily choosing a parent when a choice must be made

TransactionIdHeadBranchBacktrack Int

git equivalent of ^: walk back one parent level to the nth arbitrarily-chosen parent

TransactionStampHeadBacktrack UTCTime

git equivalent of 'git-rev-list -n 1 --before X' find the first transaction which was created before the timestamp

Instances
Eq TransactionIdHeadBacktrack Source # 
Instance details

Defined in ProjectM36.TransactionGraph

Show TransactionIdHeadBacktrack Source # 
Instance details

Defined in ProjectM36.TransactionGraph

Generic TransactionIdHeadBacktrack Source # 
Instance details

Defined in ProjectM36.TransactionGraph

Associated Types

type Rep TransactionIdHeadBacktrack :: * -> * #

Binary TransactionIdHeadBacktrack Source # 
Instance details

Defined in ProjectM36.TransactionGraph

type Rep TransactionIdHeadBacktrack Source # 
Instance details

Defined in ProjectM36.TransactionGraph

type Rep TransactionIdHeadBacktrack = D1 (MetaData "TransactionIdHeadBacktrack" "ProjectM36.TransactionGraph" "project-m36-0.5.1-38P1EVgZYrJ9HDkvLyCm0" False) (C1 (MetaCons "TransactionIdHeadParentBacktrack" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) :+: (C1 (MetaCons "TransactionIdHeadBranchBacktrack" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) :+: C1 (MetaCons "TransactionStampHeadBacktrack" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime))))

data TransactionGraphOperator Source #

Operators which manipulate a transaction graph and which transaction the current Session is based upon.

Instances
Eq TransactionGraphOperator Source # 
Instance details

Defined in ProjectM36.TransactionGraph

Show TransactionGraphOperator Source # 
Instance details

Defined in ProjectM36.TransactionGraph

Generic TransactionGraphOperator Source # 
Instance details

Defined in ProjectM36.TransactionGraph

Associated Types

type Rep TransactionGraphOperator :: * -> * #

Binary TransactionGraphOperator Source # 
Instance details

Defined in ProjectM36.TransactionGraph

type Rep TransactionGraphOperator Source # 
Instance details

Defined in ProjectM36.TransactionGraph

createMergeTransaction :: UTCTime -> TransactionId -> MergeStrategy -> TransactionGraph -> (Transaction, Transaction) -> Either MergeError Transaction Source #

Execute the merge strategy against the transactions, returning a new transaction which can be then added to the transaction graph

validateHeadName :: HeadName -> TransactionGraph -> (Transaction, Transaction) -> Either MergeError Transaction Source #

Returns the correct Transaction for the branch name in the graph and ensures that it is one of the two transaction arguments in the tuple.

pathToTransaction :: TransactionGraph -> Transaction -> Transaction -> Set Transaction -> Either RelationalError (Set Transaction) Source #

Search from a past graph point to all following heads for a specific transaction. If found, return the transaction path, otherwise a RelationalError.

filterSubGraph :: TransactionGraph -> TransactionHeads -> Either RelationalError TransactionGraph Source #

After splicing out a subgraph, run it through this function to remove references to transactions which are not in the subgraph.

autoMergeToHead :: UTCTime -> (TransactionId, TransactionId, TransactionId) -> DisconnectedTransaction -> HeadName -> MergeStrategy -> TransactionGraph -> Either RelationalError (DisconnectedTransaction, TransactionGraph) Source #

Create a temporary branch for commit, merge the result to head, delete the temporary branch. This is useful to atomically commit a transaction, avoiding a TransactionIsNotHeadError but trading it for a potential MergeError. this is not a GraphOp because it combines multiple graph operations