PostgresClient

A Postgres client with connection pooling.

Constructors

this
this(string connString, uint connNum, void delegate(Connection) afterStartConnectOrReset)

afterStartConnectOrReset is called after connection established

this
this(Connection delegate(in ClientSettings) @(safe) connFactory, ClientSettings cs, uint connNum)

Useful for external Connection implementation

this
this(Connection delegate() const pure @(safe) connFactory, uint connNum)

Useful for external Connection implementation

Members

Functions

lockConnection
LockedConnection lockConnection()

Get connection from the pool.

pickConnection
T pickConnection(T delegate(scope LockedConnection conn) dg)

Use connection from the pool.

Meta