packages feed

esqueleto 3.2.3 → 3.3.0

raw patch · 3 files changed

+42/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Database.Esqueleto.Internal.Internal: left_ :: (SqlString s, Num a) => (SqlExpr (Value s), SqlExpr (Value a)) -> SqlExpr (Value s)
+ Database.Esqueleto.Internal.Internal: length_ :: (SqlString s, Num a) => SqlExpr (Value s) -> SqlExpr (Value a)
+ Database.Esqueleto.Internal.Internal: ltrim_ :: SqlString s => SqlExpr (Value s) -> SqlExpr (Value s)
+ Database.Esqueleto.Internal.Internal: right_ :: (SqlString s, Num a) => (SqlExpr (Value s), SqlExpr (Value a)) -> SqlExpr (Value s)
+ Database.Esqueleto.Internal.Internal: rtrim_ :: SqlString s => SqlExpr (Value s) -> SqlExpr (Value s)
+ Database.Esqueleto.Internal.Internal: trim_ :: SqlString s => SqlExpr (Value s) -> SqlExpr (Value s)
+ Database.Esqueleto.Internal.Internal: upper_ :: SqlString s => SqlExpr (Value s) -> SqlExpr (Value s)

Files

changelog.md view
@@ -1,3 +1,9 @@+3.3.0+========++- @charukiewicz, @belevy, @joemalin95+  - [#166](https://github.com/bitemyapp/esqueleto/pull/166): Add several common SQL string functions: `upper_`, `trim_`, `ltrim_`, `rtrim_`, `length_`, `left_`, `right_`+ 3.2.3 ======== 
esqueleto.cabal view
@@ -1,7 +1,7 @@ cabal-version: 1.12  name:           esqueleto-version:        3.2.3+version:        3.3.0 synopsis:       Type-safe EDSL for SQL queries on persistent backends. description:    @esqueleto@ is a bare bones, type-safe EDSL for SQL queries that works with unmodified @persistent@ SQL backends.  Its language closely resembles SQL, so you don't have to learn new concepts, just new syntax, and it's fairly easy to predict the generated SQL and optimize it for your backend. Most kinds of errors committed when writing SQL are caught as compile-time errors---although it is possible to write type-checked @esqueleto@ queries that fail at runtime.                 .
src/Database/Esqueleto/Internal/Internal.hs view
@@ -681,6 +681,41 @@ lower_ :: SqlString s => SqlExpr (Value s) -> SqlExpr (Value s) lower_  = unsafeSqlFunction "LOWER" +-- | @UPPER@ function.+-- /Since: 3.3.0/+upper_ :: SqlString s => SqlExpr (Value s) -> SqlExpr (Value s)+upper_  = unsafeSqlFunction "UPPER"++-- | @TRIM@ function.+-- /Since: 3.3.0/+trim_ :: SqlString s => SqlExpr (Value s) -> SqlExpr (Value s)+trim_  = unsafeSqlFunction "TRIM"++-- | @RTRIM@ function.+-- /Since: 3.3.0/+rtrim_ :: SqlString s => SqlExpr (Value s) -> SqlExpr (Value s)+rtrim_  = unsafeSqlFunction "RTRIM"++-- | @LTRIM@ function.+-- /Since: 3.3.0/+ltrim_ :: SqlString s => SqlExpr (Value s) -> SqlExpr (Value s)+ltrim_  = unsafeSqlFunction "LTRIM"++-- | @LENGTH@ function.+-- /Since: 3.3.0/+length_ :: (SqlString s, Num a) => SqlExpr (Value s) -> SqlExpr (Value a)+length_ = unsafeSqlFunction "LENGTH"++-- | @LEFT@ function.+-- /Since: 3.3.0/+left_ :: (SqlString s, Num a) => (SqlExpr (Value s), SqlExpr (Value a)) -> SqlExpr (Value s)+left_ = unsafeSqlFunction "LEFT"++-- | @RIGHT@ function.+-- /Since: 3.3.0/+right_ :: (SqlString s, Num a) => (SqlExpr (Value s), SqlExpr (Value a)) -> SqlExpr (Value s)+right_ = unsafeSqlFunction "RIGHT"+ -- | @LIKE@ operator. like :: SqlString s => SqlExpr (Value s) -> SqlExpr (Value s) -> SqlExpr (Value Bool) like    = unsafeSqlBinOp    " LIKE "