database

package
v0.0.0-...-2e1d7a2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QB = sq.StatementBuilder.PlaceholderFormat(sq.Dollar)

QB is the query builder with PostgreSQL placeholder format.

Functions

func RunMigrations

func RunMigrations(ctx context.Context, pool *pgxpool.Pool) error

RunMigrations applies all pending database migrations.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

DB wraps a pgxpool.Pool for database operations.

func New

func New(ctx context.Context, databaseURL string) (*DB, error)

New creates a new database connection pool.

func (*DB) Close

func (db *DB) Close()

Close closes the database connection pool.

func (*DB) Pool

func (db *DB) Pool() *pgxpool.Pool

Pool returns the underlying connection pool.

Jump to

Keyboard shortcuts

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