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

Safe HaskellNone
LanguageHaskell2010

Opaleye.Classy

Documentation

opaleyeEnvConn :: HasOpaleyeEnv c => Lens' c Connection Source

_OpaleyeSqlError :: AsOpaleyeError r => Prism' r SqlError Source

_OpaleyeQueryError :: AsOpaleyeError r => Prism' r QueryError Source

_OpaleyeResultError :: AsOpaleyeError r => Prism' r ResultError Source

type CanOpaleye m c e = (MonadReader c m, MonadError e m, MonadIO m, Applicative m, AsOpaleyeError e, HasOpaleyeEnv c) Source

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

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

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

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

liftUpdate :: CanOpaleye 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