Safe Haskell | None |
---|---|
Language | Haskell98 |
- raw :: RawSQL () -> SQL
- runQuery_ :: (IsSQL sql, MonadDB m) => sql -> m ()
- runQuery01 :: (IsSQL sql, MonadDB m, MonadThrow m) => sql -> m Bool
- runQuery01_ :: (IsSQL sql, MonadDB m, MonadThrow m) => sql -> m ()
- runSQL :: MonadDB m => SQL -> m Int
- runSQL_ :: MonadDB m => SQL -> m ()
- runSQL01 :: (MonadDB m, MonadThrow m) => SQL -> m Bool
- runSQL01_ :: (MonadDB m, MonadThrow m) => SQL -> m ()
- fetchMany :: (MonadDB m, FromRow row) => (row -> t) -> m [t]
- fetchMaybe :: (MonadDB m, MonadThrow m, FromRow row) => (row -> t) -> m (Maybe t)
- fetchOne :: (MonadDB m, MonadThrow m, FromRow row) => (row -> t) -> m t
- hpqTypesError :: String -> IO a
Documentation
runQuery_ :: (IsSQL sql, MonadDB m) => sql -> m () Source
Specialization of runQuery
that discards the result.
runQuery01 :: (IsSQL sql, MonadDB m, MonadThrow m) => sql -> m Bool Source
Specialization of runQuery
that checks whether affected/returned
number of rows is in range [0, 1] and returns appropriate Bool
value.
Otherwise, AffectedRowsMismatch
exception is thrown.
runQuery01_ :: (IsSQL sql, MonadDB m, MonadThrow m) => sql -> m () Source
Specialization of runQuery01
that discards the result.
runSQL01 :: (MonadDB m, MonadThrow m) => SQL -> m Bool Source
Specialization of runQuery01
to SQL
type.
runSQL01_ :: (MonadDB m, MonadThrow m) => SQL -> m () Source
Specialization of runQuery01_
to SQL
type.
fetchMany :: (MonadDB m, FromRow row) => (row -> t) -> m [t] Source
Specialization of foldrM
that fetches list of rows.
fetchMaybe :: (MonadDB m, MonadThrow m, FromRow row) => (row -> t) -> m (Maybe t) Source
Specialization of foldlM
that fetches one or zero rows. If more
rows are delivered, AffectedRowsMismatch
exception is thrown.
fetchOne :: (MonadDB m, MonadThrow m, FromRow row) => (row -> t) -> m t Source
Specialization of foldlM
that fetches exactly one row. If different
number of rows is delivered, AffectedRowsMismatch
exception is thrown.
hpqTypesError :: String -> IO a Source
Throw 'HPQTypesError exception.