Safe Haskell | None |
---|---|
Language | Haskell2010 |
Database access for your App
Synopsis
- class HasSqlPool app where
- getSqlPool :: app -> SqlPool
- type SqlPool = Pool SqlBackend
- makePostgresPool :: IO SqlPool
- makePostgresPoolWith :: PostgresConnectionConf -> IO SqlPool
- runDB :: (HasSqlPool app, MonadUnliftIO m, MonadReader app m) => SqlPersistT m a -> m a
- data PostgresConnectionConf = PostgresConnectionConf {}
- data PostgresPasswordSource
- data PostgresPassword
- data PostgresStatementTimeout
- postgresStatementTimeoutMilliseconds :: PostgresStatementTimeout -> Int
- envParseDatabaseConf :: PostgresPasswordSource -> Parser PostgresConnectionConf
- envPostgresPasswordSource :: Parser PostgresPasswordSource
Abstract over access to a sql database
class HasSqlPool app where Source #
getSqlPool :: app -> SqlPool Source #
Instances
HasSqlPool SqlPool Source # | |
Defined in Freckle.App.Database getSqlPool :: SqlPool -> SqlPool Source # |
type SqlPool = Pool SqlBackend Source #
runDB :: (HasSqlPool app, MonadUnliftIO m, MonadReader app m) => SqlPersistT m a -> m a Source #
data PostgresConnectionConf Source #
Instances
Eq PostgresConnectionConf Source # | |
Defined in Freckle.App.Database | |
Show PostgresConnectionConf Source # | |
Defined in Freckle.App.Database showsPrec :: Int -> PostgresConnectionConf -> ShowS # show :: PostgresConnectionConf -> String # showList :: [PostgresConnectionConf] -> ShowS # |
data PostgresPasswordSource Source #
Instances
Eq PostgresPasswordSource Source # | |
Defined in Freckle.App.Database | |
Show PostgresPasswordSource Source # | |
Defined in Freckle.App.Database showsPrec :: Int -> PostgresPasswordSource -> ShowS # show :: PostgresPasswordSource -> String # showList :: [PostgresPasswordSource] -> ShowS # |
data PostgresPassword Source #
Instances
Eq PostgresPassword Source # | |
Defined in Freckle.App.Database (==) :: PostgresPassword -> PostgresPassword -> Bool # (/=) :: PostgresPassword -> PostgresPassword -> Bool # | |
Show PostgresPassword Source # | |
Defined in Freckle.App.Database showsPrec :: Int -> PostgresPassword -> ShowS # show :: PostgresPassword -> String # showList :: [PostgresPassword] -> ShowS # |
data PostgresStatementTimeout Source #
Instances
Eq PostgresStatementTimeout Source # | |
Defined in Freckle.App.Database | |
Show PostgresStatementTimeout Source # | |
Defined in Freckle.App.Database showsPrec :: Int -> PostgresStatementTimeout -> ShowS # show :: PostgresStatementTimeout -> String # showList :: [PostgresStatementTimeout] -> ShowS # |