esqueleto 3.5.1.0 → 3.5.2.0
raw patch · 3 files changed
+20/−1 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Database.Esqueleto.Experimental.From.Join: instance (Database.Esqueleto.Internal.Internal.SqlSelect a ra, Database.Esqueleto.Internal.Internal.SqlSelect b rb) => Database.Esqueleto.Internal.Internal.SqlSelect (a Database.Esqueleto.Experimental.From.Join.:& b) (ra Database.Esqueleto.Experimental.From.Join.:& rb)
Files
- changelog.md +7/−0
- esqueleto.cabal +1/−1
- src/Database/Esqueleto/Experimental/From/Join.hs +12/−0
changelog.md view
@@ -1,3 +1,10 @@+3.5.2.0+=======+- @ivanbakel+ - [#268](https://github.com/bitemyapp/esqueleto/pull/268)+ - Added `SqlSelect` instance for `(:&)`, allowing it to be returned from+ queries just like `(,)` tuples.+ 3.5.1.0 ======= - @ibarrae
esqueleto.cabal view
@@ -1,7 +1,7 @@ cabal-version: 1.12 name: esqueleto-version: 3.5.1.0+version: 3.5.2.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/Experimental/From/Join.hs view
@@ -49,6 +49,18 @@ instance {-# OVERLAPPABLE #-} ToFrom a a' => ValidOnClause a instance ValidOnClause (a -> SqlQuery b) +-- | You may return joined values from a 'select' query - this is+-- identical to the tuple instance, but is provided for convenience.+--+-- @since 3.5.2.0+instance (SqlSelect a ra, SqlSelect b rb) => SqlSelect (a :& b) (ra :& rb) where+ sqlSelectCols esc (a :& b) = sqlSelectCols esc (a, b)+ sqlSelectColCount = sqlSelectColCount . toTuple+ where+ toTuple :: Proxy (a :& b) -> Proxy (a, b)+ toTuple = const Proxy+ sqlSelectProcessRow = fmap (uncurry (:&)) . sqlSelectProcessRow+ -- | An @ON@ clause that describes how two tables are related. This should be -- used as an infix operator after a 'JOIN'. For example, --