Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type DataSourceProvider = LoggingT IO DataSource
- type DataSource = ConnectionPool
- type DB = SqlPersistT
- runTrans :: MonadUnliftIO m => DB (AppM m) a -> AppM m a
- primaryDatasourceMiddleware :: DataSourceProvider -> AppMiddleware
- runTransWith :: MonadUnliftIO m => Key DataSource -> DB (AppM m) a -> AppM m a
- datasourceMiddleware :: Key DataSource -> DataSourceProvider -> AppMiddleware
- query :: MonadUnliftIO m => Text -> [PersistValue] -> DB m [[PersistValue]]
- selectValue :: (PersistField a, MonadUnliftIO m) => Text -> DB m [a]
DataSource Types
type DataSourceProvider = LoggingT IO DataSource Source #
type DataSource = ConnectionPool Source #
type DB = SqlPersistT Source #
Primary DataSource Functions
Secondary DataSource Functions
runTransWith :: MonadUnliftIO m => Key DataSource -> DB (AppM m) a -> AppM m a Source #
Sql Functions
query :: MonadUnliftIO m => Text -> [PersistValue] -> DB m [[PersistValue]] Source #
selectValue :: (PersistField a, MonadUnliftIO m) => Text -> DB m [a] Source #