Fix non-exhaustive pattern match warning by duplicating a line.
This commit is contained in:
committed by
Steve Chávez
parent
97ea99402d
commit
ea2f89e234
@@ -241,12 +241,15 @@ addJoinConditions schema previousAlias (Node node@(query@Select{from=tbl}, nodeP
|
|||||||
-- previousAlias and newAlias are used in the case of self joins
|
-- previousAlias and newAlias are used in the case of self joins
|
||||||
getJoinConditions :: Maybe Alias -> Maybe Alias -> Relation -> [JoinCondition]
|
getJoinConditions :: Maybe Alias -> Maybe Alias -> Relation -> [JoinCondition]
|
||||||
getJoinConditions previousAlias newAlias (Relation Table{tableSchema=tSchema, tableName=tN} cols Table{tableName=ftN} fCols typ lt lc1 lc2) =
|
getJoinConditions previousAlias newAlias (Relation Table{tableSchema=tSchema, tableName=tN} cols Table{tableName=ftN} fCols typ lt lc1 lc2) =
|
||||||
if | typ == Child || typ == Parent ->
|
case typ of
|
||||||
|
Child ->
|
||||||
zipWith (toJoinCondition tN ftN) cols fCols
|
zipWith (toJoinCondition tN ftN) cols fCols
|
||||||
| typ == Many ->
|
Parent ->
|
||||||
|
zipWith (toJoinCondition tN ftN) cols fCols
|
||||||
|
Many ->
|
||||||
let ltN = maybe "" tableName lt in
|
let ltN = maybe "" tableName lt in
|
||||||
zipWith (toJoinCondition tN ltN) cols (fromMaybe [] lc1) ++ zipWith (toJoinCondition ftN ltN) fCols (fromMaybe [] lc2)
|
zipWith (toJoinCondition tN ltN) cols (fromMaybe [] lc1) ++ zipWith (toJoinCondition ftN ltN) fCols (fromMaybe [] lc2)
|
||||||
| typ == Root -> witness
|
Root -> witness
|
||||||
where
|
where
|
||||||
toJoinCondition :: Text -> Text -> Column -> Column -> JoinCondition
|
toJoinCondition :: Text -> Text -> Column -> Column -> JoinCondition
|
||||||
toJoinCondition tb ftb c fc =
|
toJoinCondition tb ftb c fc =
|
||||||
|
|||||||
Reference in New Issue
Block a user