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.

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.