Skip to content

Commit

Permalink
update ReferencedTransactionIds for this branch
Browse files Browse the repository at this point in the history
  • Loading branch information
agentm committed May 9, 2024
1 parent 7c5070c commit 030e0d5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/ProjectM36/ReferencedTransactionIds.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ instance ReferencedTransactionIds a => ReferencedTransactionIds (RelationalExprB
MakeStaticRelation{} -> S.empty
ExistingRelation{} -> S.empty
RelationVariable _ marker -> referencedTransactionIds marker
RelationValuedAttribute _ -> S.empty
Project attrNames expr -> S.union (referencedTransactionIds attrNames) (referencedTransactionIds expr)
Union exprA exprB -> S.union (referencedTransactionIds exprA) (referencedTransactionIds exprB)
Join exprA exprB -> S.union (referencedTransactionIds exprA) (referencedTransactionIds exprB)
Rename _ _ expr -> referencedTransactionIds expr
Rename _ expr -> referencedTransactionIds expr
Difference exprA exprB -> S.union (referencedTransactionIds exprA) (referencedTransactionIds exprB)
Group attrNames _ expr -> S.union (referencedTransactionIds attrNames) (referencedTransactionIds expr)
Ungroup _ expr -> referencedTransactionIds expr
Expand Down Expand Up @@ -101,6 +102,10 @@ instance ReferencedTransactionIds a => ReferencedTransactionIds (AtomExprBase a)
referencedTransactionIds rExpr
ConstructedAtomExpr _ args marker ->
S.unions (referencedTransactionIds marker : (referencedTransactionIds <$> args))
IfThenAtomExpr ifE thenE elseE ->
S.unions [referencedTransactionIds ifE,
referencedTransactionIds thenE,
referencedTransactionIds elseE]

-- only the relvars can reference other transactions
instance ReferencedTransactionIds DatabaseContext where
Expand Down

0 comments on commit 030e0d5

Please sign in to comment.