From 592a017e6cf9f713b4b36f629186c4178f4a6de4 Mon Sep 17 00:00:00 2001 From: Matt Parsons Date: Wed, 17 Jan 2018 13:08:20 -0700 Subject: [PATCH] don't use aliases --- src/Database/Esqueleto/Internal/Sql.hs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Database/Esqueleto/Internal/Sql.hs b/src/Database/Esqueleto/Internal/Sql.hs index 80310c0..a1f1b39 100644 --- a/src/Database/Esqueleto/Internal/Sql.hs +++ b/src/Database/Esqueleto/Internal/Sql.hs @@ -971,16 +971,22 @@ deleteCount = rawEsqueleto DELETE -- 'where_' $ isNothing (p '^.' PersonAge) -- @ update :: ( MonadIO m - , SqlEntity val ) + , SqlEntity val + , BackendCompatible SqlBackend backend + , PersistQueryWrite backend + , PersistUniqueWrite backend) => (SqlExpr (Entity val) -> SqlQuery ()) - -> SqlWriteT m () + -> R.ReaderT backend m () update = void . updateCount -- | Same as 'update', but returns the number of rows affected. updateCount :: ( MonadIO m - , SqlEntity val ) + , SqlEntity val + , BackendCompatible SqlBackend backend + , PersistQueryWrite backend + , PersistUniqueWrite backend) => (SqlExpr (Entity val) -> SqlQuery ()) - -> SqlWriteT m Int64 + -> R.ReaderT backend m Int64 updateCount = rawEsqueleto UPDATE . from