package
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Apr 18, 2026
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package pgx provides pgx pool helpers for Postgres.
Package pgx 提供 Postgres 的 pgx 连接池辅助。
BuildDSN returns a Postgres DSN.
BuildDSN 返回 Postgres DSN。
NewPool creates a pgx connection pool.
NewPool 创建 pgx 连接池。
Example / 示例:
pool, _ := pgx.NewPool(ctx, pgx.Config{Host: "localhost", Port: 5432, User: "app", Name: "db"})
Ping performs a lightweight health check against the pool.
Ping 对连接池执行轻量健康检查。
Config holds Postgres connection settings.
Config 包含 Postgres 连接配置。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.