opaleye-classy-0.1.0.0: Opaleye wrapped up in classy MTL attire.

Safe HaskellNone
LanguageHaskell2010

Opaleye.Classy

Documentation

data DbEnv Source

Constructors

DbEnv 

dbEnvConn :: HasDbEnv c => Lens' c Connection Source

_DbSqlError :: AsDbError r => Prism' r SqlError Source

type CanDb m c e = (MonadReader c m, MonadError e m, MonadIO m, Applicative m, AsDbError e, HasDbEnv c) Source

liftQuery :: (CanDb m c e, Default QueryRunner a b) => Query a -> m [b] Source

liftInsert :: CanDb m c e => Table colW colR -> colW -> m Int64 Source

liftInsertReturning :: (CanDb m c e, Default QueryRunner ret hask, Default Unpackspec ret ret) => Table colW colR -> (colR -> ret) -> colW -> m [hask] Source

liftDelete :: CanDb m c e => Table colW colR -> (colR -> Column PGBool) -> m Int64 Source

liftUpdate :: CanDb m c e => Table colW colR -> (colR -> colW) -> (colR -> Column PGBool) -> m Int64 Source

derivePGField :: forall a b. FromField a => (a -> b) -> Field -> Maybe ByteString -> Conversion b Source