Safe Haskell | None |
---|---|
Language | Haskell2010 |
- runSelect :: (MonadIO m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> SqlSelect PgSelectSyntax a -> (ConduitT () a m () -> m b) -> m b
- runInsert :: MonadIO m => Connection -> SqlInsert PgInsertSyntax -> m Int64
- runInsertReturning :: (MonadIO m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> PgInsertReturning a -> (ConduitT () a m () -> m b) -> m b
- runUpdate :: MonadIO m => Connection -> SqlUpdate PgUpdateSyntax tbl -> m Int64
- runUpdateReturning :: (MonadIO m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> PgUpdateReturning a -> (ConduitT () a m () -> m b) -> m b
- runDelete :: MonadIO m => Connection -> SqlDelete PgDeleteSyntax tbl -> m Int64
- runDeleteReturning :: (MonadIO 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, MonadBaseControl IO m, Functor m, FromBackendRow Postgres r) => Connection -> PgSyntax -> (ConduitT () r m () -> m b) -> m b
SELECT
runSelect :: (MonadIO m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> SqlSelect PgSelectSyntax a -> (ConduitT () a m () -> m b) -> m b Source #
Run a PostgreSQL SELECT
statement in any MonadIO
.
INSERT
runInsert :: MonadIO m => Connection -> SqlInsert PgInsertSyntax -> m Int64 Source #
Run a PostgreSQL INSERT
statement in any MonadIO
. Returns the number of
rows affected.
runInsertReturning :: (MonadIO m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> PgInsertReturning a -> (ConduitT () a m () -> m b) -> m b Source #
UPDATE
runUpdate :: MonadIO m => Connection -> SqlUpdate PgUpdateSyntax tbl -> m Int64 Source #
Run a PostgreSQL UPDATE
statement in any MonadIO
. Returns the number of
rows affected.
runUpdateReturning :: (MonadIO m, MonadBaseControl IO m, FromBackendRow Postgres a) => Connection -> PgUpdateReturning a -> (ConduitT () a m () -> m b) -> m b Source #
DELETE
runDelete :: MonadIO m => Connection -> SqlDelete PgDeleteSyntax tbl -> m Int64 Source #
Run a PostgreSQL DELETE
statement in any MonadIO
. Returns the number of
rows affected.
runDeleteReturning :: (MonadIO 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, 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