Postgres module

connection_for

procedure · 1 overloadsince 0.27.0Source

The held connection for this pair, connecting when there is none, or why it cannot. Failures are remembered for a while.

connection_for :: (
    url: string,
    database: string
) -> (*Pg.Connection, string)

The held connection for this pair, connecting when there is none, or why it cannot. Failures are remembered for a while.

Parameters

url: string
the database URL.
database: string
a database name to use instead of the URL's. Empty keeps the URL's.

Returns

string

See also