Safe Haskell | None |
---|---|
Language | Haskell2010 |
- finally :: Monad m => m a -> ReaderT r (MaybeT m) b -> ReaderT r (MaybeT m) b
- finally' :: (MonadIO m, MonadFail m) => IO a -> MaybeT IO b -> m b
- faillog :: (MonadIO m, MonadFail m) => String -> m a
- faillogS :: (MonadIO m, MonadFail m) => Text -> String -> m a
- withConnection :: MonadIO m => String -> String -> String -> (SQLHENV -> SQLHDBC -> ReaderT r (MaybeT m) a) -> ReaderT r (MaybeT m) a
- withConnection' :: (MonadIO m, HasDBInfo r) => (SQLHENV -> SQLHDBC -> ReaderT r (MaybeT m) a) -> ReaderT r (MaybeT m) a
- withEnvConnection :: MonadIO m => SQLHENV -> String -> String -> String -> (SQLHENV -> SQLHDBC -> ReaderT r (MaybeT m) a) -> ReaderT r (MaybeT m) a
- withEnvConnection' :: (MonadIO m, HasDBInfo r) => SQLHENV -> (SQLHENV -> SQLHDBC -> ReaderT r (MaybeT m) a) -> ReaderT r (MaybeT m) a
- connect' :: (MonadIO m, MonadFail m, HasDBInfo r) => SQLHENV -> ReaderT r m SQLHDBC
- data ProgramOptions = ProgramOptions {}
- data DBInfo = DBInfo {}
- class HasDBInfo a where
- forAllTables :: (MonadFail m, MonadIO m, HasDBInfo r) => SQLHDBC -> a -> (a -> String -> ReaderT r (MaybeT m) a) -> ReaderT r (MaybeT m) a
Documentation
finally :: Monad m => m a -> ReaderT r (MaybeT m) b -> ReaderT r (MaybeT m) b Source #
runs the run
action, then, runs the afterRun
action no matter if the
run
action failed or succeeded
faillog :: (MonadIO m, MonadFail m) => String -> m a Source #
calls fail on the MonadFail logging an error message
faillogS :: (MonadIO m, MonadFail m) => Text -> String -> m a Source #
the variant of faillog
taking a log source as parameter
:: MonadIO m | |
=> String | datasource name |
-> String | user name |
-> String | password |
-> (SQLHENV -> SQLHDBC -> ReaderT r (MaybeT m) a) | a function that gets the newly allocated environment and connection handlers |
-> ReaderT r (MaybeT m) a |
setup db environment and connect to database
withConnection' :: (MonadIO m, HasDBInfo r) => (SQLHENV -> SQLHDBC -> ReaderT r (MaybeT m) a) -> ReaderT r (MaybeT m) a Source #
:: MonadIO m | |
=> SQLHENV | handle to environment |
-> String | datasource name |
-> String | user name |
-> String | password |
-> (SQLHENV -> SQLHDBC -> ReaderT r (MaybeT m) a) | a function that gets the newly allocated environment and connection handlers |
-> ReaderT r (MaybeT m) a |
connect to database in an existing db environment
withEnvConnection' :: (MonadIO m, HasDBInfo r) => SQLHENV -> (SQLHENV -> SQLHDBC -> ReaderT r (MaybeT m) a) -> ReaderT r (MaybeT m) a Source #
call withEnvConnect
within a ReaderT
environment containing database connnetion info
connect' :: (MonadIO m, MonadFail m, HasDBInfo r) => SQLHENV -> ReaderT r m SQLHDBC Source #
call connect
within a ReaderT environment containing database connnetion info
data ProgramOptions Source #
the environment used to run the program
HasDBInfo ProgramOptions Source # | an instance that deals only with source db |
Information about source or destination db
DBInfo | |
|