-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Types for easy adding postgresql configuration to your program -- @package postgresql-config @version 0.0.2 module Database.PostgreSQL.Config -- | Configuration parsed from json or yaml file, or obtained by any other -- way. Example configuration yml is: -- --
--   database:    "dbname"
--   host:        "127.0.0.1"        # optional
--   port:        "5432"             # optional
--   user:        "dbuser"
--   password:    "pass"
--   poolsize:    "10"               # optional maximum connections in pool
--   pooltimeout: "60"               # optional minimum connection lifetime
--   poolstripes: "1"                # optional count of stripes in pool
--   
data PostgresConf PostgresConf :: ByteString -> Int -> NominalDiffTime -> Int -> PostgresConf -- | The connection string. pgConnStr :: PostgresConf -> ByteString -- | How many connections should be held on the connection pool. pgPoolSize :: PostgresConf -> Int -- | Timeout to stay connection active pgPoolTimeout :: PostgresConf -> NominalDiffTime -- | Stripes in the pool pgPoolStripes :: PostgresConf -> Int -- | Connection pool. Must be created from settings using -- createPGPool newtype PGPool PGPool :: (Pool Connection) -> PGPool unPGPool :: PGPool -> (Pool Connection) -- | Create pool from parsed configuration createPGPool :: PostgresConf -> IO PGPool -- | Force to create at least one connection in pool. Usefull to check -- connection settings at program start time pingPGPool :: PGPool -> IO () -- | Combinator for simple implementation of withPGConnection -- method from package postgresql-query. Typical usage is: -- --
--   instance HasPostgres (HandlerT App IO) where
--       withPGConnection = withPGPool appPGPool
--   
withPGPool :: (MonadReader site m, MonadBaseControl IO m) => (site -> PGPool) -> (Connection -> m a) -> m a -- | Another combinator to implement withPGConnection -- --
--   instance HasPostgres (OurMonadT IO) where
--       withPGConnection = withPGPoolPrim $ getPGPool <$> getSomeThing
--   
withPGPoolPrim :: MonadBaseControl IO m => m PGPool -> (Connection -> m a) -> m a instance Typeable PGPool instance Show PGPool instance Generic PGPool instance Ord PostgresConf instance Eq PostgresConf instance Show PostgresConf instance Datatype D1PGPool instance Constructor C1_0PGPool instance Selector S1_0_0PGPool instance FromJSON PostgresConf