Yggdrasil for PostgreSQL v5.0.1 Yggdrasil.Postgres.Connection View Source
This module defines a PostgreSQL connection.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Gets connection from a connection
process.
Starts a PostgreSQL connection with a tag
and namespace
for the
configuration. Additionally, it receives GenServer
options
.
Stops a PostgreSQL connection
. Optionally, it receives a stop reason
(defaults to :normal
) and a timeout in milliseconds (defaults to
:infinity
).
Subscribes to the connection given a tag
and namespace
.
Link to this section Types
Namespace for the connection.
Connection types.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
get(connection)
View Sourceget(GenServer.name()) :: {:ok, term()} | {:error, term()}
Gets connection from a connection
process.
start_link(config, options \\ [])
View Sourcestart_link(map(), GenServer.options()) :: GenServer.on_start()
Starts a PostgreSQL connection with a tag
and namespace
for the
configuration. Additionally, it receives GenServer
options
.
stop(connection, reason \\ :normal, timeout \\ :infinity)
View Sourcestop(GenServer.name(), term(), :infinity | non_neg_integer()) :: :ok
Stops a PostgreSQL connection
. Optionally, it receives a stop reason
(defaults to :normal
) and a timeout in milliseconds (defaults to
:infinity
).
Subscribes to the connection given a tag
and namespace
.