Skip to content

Commit

Permalink
Fix: the Foldable instance of WithPlaceholderOffsets is unexpectedly …
Browse files Browse the repository at this point in the history
…used
  • Loading branch information
Yuji Yamamoto committed May 22, 2019
1 parent 097ef4e commit 1e2a7a9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions relational-query/src/Database/Relational/SqlSyntax/Fold.hs
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ selectPrefixSQL up da = SELECT <> showsDuplication da <>
-- SQL with no ordering term is not paren-ed.
normalizedSQL :: SubQuery -> StringSQL
normalizedSQL = d where
d (Table t) = fromTableToNormalizedSQL t
d sub@(Bin {}) = showUnitSQL sub
d (Table t) = fromTableToNormalizedSQL t
d sub@(Bin {}) = showUnitSQL sub
d sub@(Flat _ _ _ _ _ ots)
| null ots = showSQL sub
| otherwise = showUnitSQL sub
| null $ detachPlaceholderOffsets ots = showSQL sub
| otherwise = showUnitSQL sub
d sub@(Aggregated _ _ _ _ _ _ _ ots)
| null ots = showSQL sub
| otherwise = showUnitSQL sub
| null $ detachPlaceholderOffsets ots = showSQL sub
| otherwise = showUnitSQL sub

-- | SQL string for nested-query and toplevel-SQL.
toSQLs :: SubQuery
Expand Down

0 comments on commit 1e2a7a9

Please sign in to comment.