Move lower_ around.

This commit is contained in:
Felipe Lessa 2015-07-15 14:19:46 -03:00
parent 4008fa9813
commit 39bc711563
2 changed files with 3 additions and 2 deletions

View File

@ -350,7 +350,6 @@ class (Functor query, Applicative query, Monad query) =>
min_ :: (PersistField a) => expr (Value a) -> expr (Value (Maybe a))
max_ :: (PersistField a) => expr (Value a) -> expr (Value (Maybe a))
avg_ :: (PersistField a, PersistField b) => expr (Value a) -> expr (Value (Maybe b))
lower_ :: (PersistField a, IsString a) => expr (Value a) -> expr (Value a)
-- | @COALESCE@ function. Evaluates the arguments in order and
-- returns the value of the first non-NULL expression, or NULL
@ -368,6 +367,8 @@ class (Functor query, Applicative query, Monad query) =>
-- /Since: 1.4.3/
coalesceDefault :: PersistField a => [expr (Value (Maybe a))] -> expr (Value a) -> expr (Value a)
-- | @LOWER@ function.
lower_ :: (PersistField a, IsString a) => expr (Value a) -> expr (Value a)
-- | @LIKE@ operator.
like :: (PersistField s, IsString s) => expr (Value s) -> expr (Value s) -> expr (Value Bool)
-- | @ILIKE@ operator (case-insensitive @LIKE@).

View File

@ -475,11 +475,11 @@ instance Esqueleto SqlQuery SqlExpr SqlBackend where
min_ = unsafeSqlFunction "MIN"
max_ = unsafeSqlFunction "MAX"
avg_ = unsafeSqlFunction "AVG"
lower_ = unsafeSqlFunction "LOWER"
coalesce = unsafeSqlFunctionParens "COALESCE"
coalesceDefault exprs = unsafeSqlFunctionParens "COALESCE" . (exprs ++) . return . just
lower_ = unsafeSqlFunction "LOWER"
like = unsafeSqlBinOp " LIKE "
ilike = unsafeSqlBinOp " ILIKE "
(%) = unsafeSqlValue "'%'"