db

package
v0.0.0-...-a4e305b Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() (*sql.DB, error)

Connect establishes a connection to the PostgreSQL database using the pgx driver. It retrieves the connection string from the DATABASE_URL environment variable, verifies the connection with a ping, and returns a *sql.DB instance.

It returns an error if the environment variable is missing, the driver fails to open, or the database ping fails.

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