Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- runSelect :: (MonadIO m, MonadFail m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> SqlSelect Postgres a -> (ConduitT () a m () -> m b) -> m b
- runInsert :: MonadIO m => Connection -> SqlInsert Postgres tbl -> m Int64
- runInsertReturning :: (MonadIO m, MonadFail m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> PgInsertReturning a -> (ConduitT () a m () -> m b) -> m b
- runUpdate :: MonadIO m => Connection -> SqlUpdate Postgres tbl -> m Int64
- runUpdateReturning :: (MonadIO m, MonadFail m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> PgUpdateReturning a -> (ConduitT () a m () -> m b) -> m b
- runDelete :: MonadIO m => Connection -> SqlDelete Postgres tbl -> m Int64
- runDeleteReturning :: (MonadIO m, MonadFail m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> PgDeleteReturning a -> (ConduitT () a m () -> m b) -> m b
- executeStatement :: MonadIO m => Connection -> PgSyntax -> m Int64
- runQueryReturning :: (MonadIO m, MonadFail m, MonadBaseControl IO m, Functor m, FromBackendRow Postgres r) => Connection -> PgSyntax -> (ConduitT () r m () -> m b) -> m b
SELECT
runSelect :: (MonadIO m, MonadFail m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> SqlSelect Postgres a -> (ConduitT () a m () -> m b) -> m b Source #
Run a PostgreSQL SELECT
statement in any MonadIO
.
INSERT
runInsert :: MonadIO m => Connection -> SqlInsert Postgres tbl -> m Int64 Source #
Run a PostgreSQL INSERT
statement in any MonadIO
. Returns the number of
rows affected.
runInsertReturning :: (MonadIO m, MonadFail m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> PgInsertReturning a -> (ConduitT () a m () -> m b) -> m b Source #
UPDATE
runUpdate :: MonadIO m => Connection -> SqlUpdate Postgres tbl -> m Int64 Source #
Run a PostgreSQL UPDATE
statement in any MonadIO
. Returns the number of
rows affected.
runUpdateReturning :: (MonadIO m, MonadFail m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> PgUpdateReturning a -> (ConduitT () a m () -> m b) -> m b Source #
DELETE
runDelete :: MonadIO m => Connection -> SqlDelete Postgres tbl -> m Int64 Source #
Run a PostgreSQL DELETE
statement in any MonadIO
. Returns the number of
rows affected.
runDeleteReturning :: (MonadIO m, MonadFail m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> PgDeleteReturning a -> (ConduitT () a m () -> m b) -> m b Source #
Convenience functions
executeStatement :: MonadIO m => Connection -> PgSyntax -> m Int64 Source #
Run any DML statement. Return the number of rows affected
runQueryReturning :: (MonadIO m, MonadFail m, MonadBaseControl IO m, Functor m, FromBackendRow Postgres r) => Connection -> PgSyntax -> (ConduitT () r m () -> m b) -> m b Source #
Runs any query that returns a set of values