database

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTxManager

func NewTxManager(db *Database) (*manager.Manager, error)

Types

type Database

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

func New

func New(appName string, migrationsFS embed.FS) (*Database, error)

New creates a new database connection and applies migrations.

func NewForTesting

func NewForTesting(appName string) (*Database, error)

NewForTesting creates a database connection without applying migrations This is useful for testing against an existing database.

func (*Database) Close

func (d *Database) Close() error

func (*Database) GetDB

func (d *Database) GetDB(ctx context.Context) trmSqlx.Tr

Jump to

Keyboard shortcuts

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