db

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package db provides generic Postgres plumbing, connection plus migration running, with no app-specific schema. Migrations live in a consumer-owned directory of NN_name.up.sql files applied in numeric order.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(connStr string) (*sql.DB, error)

Init opens and pings a pgx-backed *sql.DB.

func Migrate

func Migrate(d *sql.DB, dir string) error

Migrate applies any not-yet-applied migration files in dir, tracking applied versions in synckit_migrations.

func MigrationFiles

func MigrationFiles(dir string) ([]string, error)

MigrationFiles returns *.up.sql paths in dir ordered by integer filename prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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