Help us shape the future of Go! Take the 2026 Go Developer Survey

db

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForceUnlockMigrations

func ForceUnlockMigrations(ctx context.Context, db *bun.DB) error

ForceUnlockMigrations releases a migration lock left by a killed run.

func New

func New(cfg config.DatabaseConfig) (*bun.DB, error)

New creates a Bun database connection based on the provided configuration.

func Ping

func Ping(ctx context.Context, db *bun.DB) error

Ping verifies the database connection is alive.

func RunMigrations

func RunMigrations(ctx context.Context, db *bun.DB) (retErr error)

RunMigrations initialises the Bun migrator and applies all pending migrations.

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