db

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DSNFromEnv

func DSNFromEnv() string

DSNFromEnv returns a PostgreSQL connection string from environment. Prefers DATABASE_URL; if unset, builds from DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAME, DB_SSLMODE.

func New

func New(ctx context.Context, connString string) (*pgxpool.Pool, error)

New creates a new pgx connection pool from connString. Uses ParseConfig and NewWithConfig for optional tuning (e.g. MaxConns). Registers UUID codec so uuid.UUID can be scanned/encoded.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL