refactor: rename RelationType to Cardinality

Remove Root type constructor
This commit is contained in:
steve-chavez
2019-11-05 12:55:48 -05:00
committed by Steve Chávez
parent db41fb454e
commit cb3d9ab625
3 changed files with 19 additions and 17 deletions
+1 -3
View File
@@ -73,9 +73,7 @@ getJoinsSelects rr@(Node (_, (name, Just Relation{relType=relTyp,relTable=Table{
<> "FROM (" <> subquery <> ") " <> pgFmtIdent table
<> "), '[]') AS " <> pgFmtIdent (fromMaybe name alias) in
(j,sel:s)
--readRequestToQuery is called only after addJoinConditions which ensures the only posible relations are Child Parent Many
Root -> witness
getJoinsSelects _ _ = witness
getJoinsSelects (Node (_, (_, Nothing, _, _, _)) _) _ = ([], [])
mutateRequestToQuery :: MutateRequest -> SqlQuery
mutateRequestToQuery (Insert mainQi iCols onConflct putConditions returnings) =