ah, yes, that is hardcoded

This commit is contained in:
Matt Parsons 2018-01-19 11:23:45 -07:00
parent 7808bc982c
commit e53f087d21
2 changed files with 16 additions and 8 deletions

View File

@ -970,18 +970,24 @@ deleteCount = rawEsqueleto DELETE
-- 'set' p [ PersonAge '=.' 'just' ('val' thisYear) -. p '^.' PersonBorn ] -- 'set' p [ PersonAge '=.' 'just' ('val' thisYear) -. p '^.' PersonBorn ]
-- 'where_' $ isNothing (p '^.' PersonAge) -- 'where_' $ isNothing (p '^.' PersonAge)
-- @ -- @
update :: ( MonadIO m update
, SqlEntity val ::
, BackendCompatible SqlBackend backend ( PersistEntityBackend val ~ backend
, PersistQueryWrite backend , PersistEntity val
, PersistUniqueWrite backend) , PersistUniqueWrite backend
=> (SqlExpr (Entity val) -> SqlQuery ()) , PersistQueryWrite backend
-> R.ReaderT backend m () , BackendCompatible SqlBackend backend
, PersistEntity val
, MonadIO m
)
=> (SqlExpr (Entity val) -> SqlQuery ())
-> R.ReaderT backend m ()
update = void . updateCount update = void . updateCount
-- | Same as 'update', but returns the number of rows affected. -- | Same as 'update', but returns the number of rows affected.
updateCount :: ( MonadIO m updateCount :: ( MonadIO m
, SqlEntity val , PersistEntity val
, PersistEntityBackend val ~ backend
, BackendCompatible SqlBackend backend , BackendCompatible SqlBackend backend
, PersistQueryWrite backend , PersistQueryWrite backend
, PersistUniqueWrite backend) , PersistUniqueWrite backend)

View File

@ -25,6 +25,8 @@ extra-deps:
- quickcheck-properties-0.1 - quickcheck-properties-0.1
- monad-logger-0.3.28 - monad-logger-0.3.28
- mono-traversable-1.0.8.1 - mono-traversable-1.0.8.1
- typed-process-0.2.1.0
- persistent-2.8.0
# - persistent-2.7.1 # - persistent-2.7.1
# - http-client-0.5.0 # - http-client-0.5.0
# - fail-4.9.0.0 # - fail-4.9.0.0