@@ -107,7 +107,6 @@ import Data.Word
107import Generics.SOP hiding (from)
107import Generics.SOP hiding (from)
108import GHC.TypeLits
108import GHC.TypeLits
110−import qualified Data.ByteString as ByteString
111import qualified GHC.Generics as GHC
110import qualified GHC.Generics as GHC
113import Squeal.PostgreSQL.Expression
112import Squeal.PostgreSQL.Expression
@@ -1091,21 +1090,15 @@ The result is `null_` if no comparison with a subquery row returns `false`,
1091and at least one comparison returns `null_`.
1090and at least one comparison returns `null_`.
1093>>> printSQL $ subAll true (.==) (values_ (true `as` #foo))
1092>>> printSQL $ subAll true (.==) (values_ (true `as` #foo))
1094−TRUE = ALL (SELECT * FROM (VALUES (TRUE)) AS t ("foo"))
1093+(TRUE = ALL (SELECT * FROM (VALUES (TRUE)) AS t ("foo")))
1097 :: Expression outer grp commons schemas params from ty1 -- ^ expression
1096 :: Expression outer grp commons schemas params from ty1 -- ^ expression
1098 -> Operator ty1 ty2 ('Null 'PGbool) -- ^ operator
1097 -> Operator ty1 ty2 ('Null 'PGbool) -- ^ operator
1099 -> Query (Join outer from) commons schemas params '[col ::: ty2] -- ^ subquery
1098 -> Query (Join outer from) commons schemas params '[col ::: ty2] -- ^ subquery
1100 -> Condition outer grp commons schemas params from
1099 -> Condition outer grp commons schemas params from
1101−subAll expr (?) qry = UnsafeExpression $
1100+subAll expr (?) qry = expr ?
1102− renderSQL expr <> op <> "ALL" <+> parenthesized (renderSQL qry)
1101+ (UnsafeExpression $ "ALL" <+> parenthesized (renderSQL qry))
1104− nil = UnsafeExpression ""
1105− op = ByteString.init
1111The right-hand side is a parenthesized subquery, which must return exactly one column.
1104The right-hand side is a parenthesized subquery, which must return exactly one column.
@@ -1115,18 +1108,15 @@ if any `true` result is obtained. The result is `false` if no true result is fou
1115(including the case where the subquery returns no rows).
1108(including the case where the subquery returns no rows).
1117>>> printSQL $ subAll "foo" like (values_ ("foobar" `as` #foo))
1110>>> printSQL $ subAll "foo" like (values_ ("foobar" `as` #foo))
1118−E'foo' LIKE ALL (SELECT * FROM (VALUES (E'foobar')) AS t ("foo"))
1111+(E'foo' LIKE ALL (SELECT * FROM (VALUES (E'foobar')) AS t ("foo")))
1121 :: Expression outer grp commons schemas params from ty1 -- ^ expression
1114 :: Expression outer grp commons schemas params from ty1 -- ^ expression
1122 -> Operator ty1 ty2 ('Null 'PGbool) -- ^ operator
1115 -> Operator ty1 ty2 ('Null 'PGbool) -- ^ operator
1123 -> Query (Join outer from) commons schemas params '[col ::: ty2] -- ^ subquery
1116 -> Query (Join outer from) commons schemas params '[col ::: ty2] -- ^ subquery
1124 -> Condition outer grp commons schemas params from
1117 -> Condition outer grp commons schemas params from
1125−subAny expr (?) qry = UnsafeExpression $
1118+subAny expr (?) qry = expr ?
1126− renderSQL expr <+> renderSQL (nil ? nil) <+> "ANY"
1127− <+> parenthesized (renderSQL qry)
1119+ (UnsafeExpression $ "ANY" <+> parenthesized (renderSQL qry))
1129− nil = UnsafeExpression ""
1132The result is `true` if the left-hand expression's result is equal
1122The result is `true` if the left-hand expression's result is equal