extended-0.1.0: Extended versions of common modules
Safe HaskellNone
LanguageGHC2021

Hasql.Pool.Extended

Synopsis

Documentation

data PoolConfig Source #

Constructors

PoolConfig 

Fields

  • size :: Int
     
  • acquisitionTimeout :: Duration

    Configured pool acquisition wait time. hasql-resource-pool only accepts whole seconds here, so we round up to the nearest second and pass it through as the pool acquisition timeout.

  • idlenessTimeout :: Duration

    Controls how long idle connections stay resident in the pool.

postgresqlConnectionStringWithPassword :: Map Text Text -> Maybe FilePathSecrets -> IO SecretText Source #

Render a PostgreSQL connection string in libpq key-value format.

Passwords from the optional secret file are inserted into the key-value map before rendering. The result is wrapped because it may contain the password.

data Pool Source #

Constructors

Pool 

Fields

initPostgresPool :: PoolConfig -> Map Text Text -> Maybe FilePathSecrets -> IO Pool Source #

Creates a pool from postgres config params.

acquisitionTimeout is mapped to the pool acquisition timeout, idlenessTimeout controls how long idle connections stay resident.