on master help sign in
Flip the arguments of in_

This now matches the SQL syntax (x IN (a, b, c))

commita90cc0f40a6777ffdb6a187c0ef133097b947925 authorOllie Charles <ollie@ocharles.org.uk> dateWed 24 Mar 2021, 18:05 (6 years ago) parenteba6b2e
1 file changed+3−3
src/Rel8/Expr/Eq.hs+3−3
src/Rel8/Expr/Eq.hs+3−3
@@ -54,8 +54,8 @@ sne = \case
5454
5555
5656sin :: (DBEq db, Foldable f)
57− => Nullability db a -> f (Expr a) -> Expr a -> Expr Bool
58−sin nullability (toList -> as) a = case nullability of
57+ => Nullability db a -> Expr a -> f (Expr a) -> Expr Bool
58+sin nullability a (toList -> as) = case nullability of
5959 Nullable -> or_ $ map (seq Nullable a) as
6060 NonNullable -> case nonEmpty as of
6161 Nothing -> false
@@ -128,5 +128,5 @@ infix 4 /=?
128128--
129129-- >>> select c $ return $ lit (42 :: Int32) `in_` [ lit x | x <- [1..5] ]
130130-- [False]
131−in_ :: (Sql DBEq a, Foldable f) => f (Expr a) -> Expr a -> Expr Bool
131+in_ :: (Sql DBEq a, Foldable f) => Expr a -> f (Expr a) -> Expr Bool
132132in_ = sin nullabilization