Documentation
¶
Overview ¶
Package database builds the SQL connection pool from config: PostgreSQL (postgres/) today, behind interfaces.DatabasePool, so switching engines is a config change. It ships no stub: a pool hands its caller a *sql.DB, which nothing zero-I/O can stand in for, so an empty kind selects PostgreSQL.
Index ¶
Constants ¶
View Source
const KindPostgres client.Kind = "postgres"
KindPostgres pools connections to PostgreSQL (the default).
Variables ¶
This section is empty.
Functions ¶
func NewFromConfig ¶
func NewFromConfig( ctx context.Context, cfg Config, deps Deps, ) (interfaces.DatabasePool, error)
NewFromConfig builds the pool cfg.Kind selects, without I/O (it connects on Start). An unknown kind is CodeInvalidInput.
Types ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package postgres is the PostgreSQL backend of the database client tier: a lifecycle-managed *sql.DB pool (Client) plus ORM-independent pool utilities — a boot-time reachability probe (Ping) and a Prometheus pool-stats collector.
|
Package postgres is the PostgreSQL backend of the database client tier: a lifecycle-managed *sql.DB pool (Client) plus ORM-independent pool utilities — a boot-time reachability probe (Ping) and a Prometheus pool-stats collector. |
Click to show internal directories.
Click to hide internal directories.