Merge pull request #113 from bitemyapp/matt/remove-class

Remove the type class
This commit is contained in:
Matt Parsons 2019-04-22 18:20:27 -06:00 committed by GitHub
commit a0274e377b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 2836 additions and 2806 deletions

View File

@ -4,7 +4,7 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
--
-- hash: 079b7696691db785c8028b0c1fad5239285ea361eed8a8f3c05d8a42250dc541
-- hash: 23efdc2ff821db986867d35578cf56e958a8cdc351813fe6c6cfdbd4a173a994
name: esqueleto
version: 2.7.0
@ -41,6 +41,7 @@ library
Database.Esqueleto.PostgreSQL
Database.Esqueleto.SQLite
other-modules:
Database.Esqueleto.Internal.Internal
Database.Esqueleto.Internal.PersistentImport
Paths_esqueleto
hs-source-dirs:

View File

@ -38,7 +38,7 @@ module Database.Esqueleto
-- $gettingstarted
-- * @esqueleto@'s Language
Esqueleto( where_, on, groupBy, orderBy, rand, asc, desc, limit, offset
where_, on, groupBy, orderBy, rand, asc, desc, limit, offset
, distinct, distinctOn, don, distinctOnOrderBy, having, locking
, sub_select, (^.), (?.)
, val, isNothing, just, nothing, joinV, withNonNull
@ -52,7 +52,7 @@ module Database.Esqueleto
, subList_select, valList, justList
, in_, notIn, exists, notExists
, set, (=.), (+=.), (-=.), (*=.), (/=.)
, case_, toBaseId)
, case_, toBaseId
, ToBaseId(..)
, when_
, then_
@ -402,8 +402,8 @@ import qualified Database.Persist
-- | @valkey i = 'val' . 'toSqlKey'@
-- (<https://github.com/prowdsponsor/esqueleto/issues/9>).
valkey :: (Esqueleto query expr backend, ToBackendKey SqlBackend entity, PersistField (Key entity)) =>
Int64 -> expr (Value (Key entity))
valkey :: (ToBackendKey SqlBackend entity, PersistField (Key entity)) =>
Int64 -> SqlExpr (Value (Key entity))
valkey = val . toSqlKey
@ -417,8 +417,8 @@ valkey = val . toSqlKey
-- (<https://github.com/prowdsponsor/esqueleto/pull/69>).
--
-- /Since: 1.4.2/
valJ :: (Esqueleto query expr backend, PersistField (Key entity)) =>
Value (Key entity) -> expr (Value (Key entity))
valJ :: (PersistField (Key entity)) =>
Value (Key entity) -> SqlExpr (Value (Key entity))
valJ = val . unValue

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -131,11 +131,11 @@ testMysqlUpdate = do
nameContains :: (BaseBackend backend ~ SqlBackend,
BackendCompatible SqlBackend backend,
Esqueleto query expr backend, MonadIO m, SqlString s,
MonadIO m, SqlString s,
IsPersistBackend backend, PersistQueryRead backend,
PersistUniqueRead backend)
=> (SqlExpr (Value [Char])
-> expr (Value s)
-> SqlExpr (Value s)
-> SqlExpr (Value Bool))
-> s
-> [Entity Person]

View File

@ -48,11 +48,11 @@ testPostgresqlCoalesce = do
nameContains :: (BaseBackend backend ~ SqlBackend,
BackendCompatible SqlBackend backend,
Esqueleto query expr backend, MonadIO m, SqlString s,
MonadIO m, SqlString s,
IsPersistBackend backend, PersistQueryRead backend,
PersistUniqueRead backend)
=> (SqlExpr (Value [Char])
-> expr (Value s)
-> SqlExpr (Value s)
-> SqlExpr (Value Bool))
-> s
-> [Entity Person]

View File

@ -132,11 +132,11 @@ testSqliteUpdate = do
nameContains :: (BaseBackend backend ~ SqlBackend,
BackendCompatible SqlBackend backend,
Esqueleto query expr backend, MonadIO m, SqlString s,
MonadIO m, SqlString s,
IsPersistBackend backend, PersistQueryRead backend,
PersistUniqueRead backend)
=> (SqlExpr (Value [Char])
-> expr (Value s)
-> SqlExpr (Value s)
-> SqlExpr (Value Bool))
-> s
-> [Entity Person]