project-m36-0.1: Relational Algebra Engine

Safe HaskellNone
LanguageHaskell2010

ProjectM36.TransactionGraph

Synopsis

Documentation

data TransactionIdLookup Source #

Record a lookup for a specific transaction in the graph.

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

data CommitOption Source #

Instances

Eq CommitOption Source # 
Show CommitOption Source # 
Generic CommitOption Source # 

Associated Types

type Rep CommitOption :: * -> * #

Binary CommitOption Source # 
type Rep CommitOption Source # 
type Rep CommitOption = D1 (MetaData "CommitOption" "ProjectM36.TransactionGraph" "project-m36-0.1-4hDd5qAZs6QAKl1BvigkeN" False) ((:+:) (C1 (MetaCons "AllowEmptyCommitOption" PrefixI False) U1) ((:+:) (C1 (MetaCons "ForbidEmptyCommitOption" PrefixI False) U1) (C1 (MetaCons "IgnoreEmptyCommitOption" PrefixI False) U1)))

data TransactionGraphOperator Source #

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

Instances

Eq TransactionGraphOperator Source # 
Show TransactionGraphOperator Source # 
Generic TransactionGraphOperator Source # 
Binary TransactionGraphOperator Source # 
type Rep TransactionGraphOperator Source # 

createMergeTransaction :: 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.