db

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunMigrations

func RunMigrations(dsn string, migrationsFS fs.FS) error

RunMigrations runs database migrations from an embedded filesystem.

Types

type DB

type DB struct {
	Pool *pgxpool.Pool
}

DB wraps a pgxpool.Pool.

func New

func New(ctx context.Context, dsn string, opts ...Option) (*DB, error)

New creates a new database connection pool.

func (*DB) Close

func (db *DB) Close()

Close closes the connection pool.

type Option

type Option func(*options)

Option configures DB creation.

func WithPgvector

func WithPgvector() Option

WithPgvector enables pgvector type registration on each connection.

Jump to

Keyboard shortcuts

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