database

package
v0.0.0-...-609fc87 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB *gorm.DB
)

Functions

func Close

func Close() error

Close closes the underlying sql.DB connection pool

func Connect

func Connect(dsn string) (*gorm.DB, error)

func SetupTestDB

func SetupTestDB(t *testing.T) (*gorm.DB, func())

SetupTestDB creates a test database connection and returns a GORM DB instance Uses a single test database and cleans tables before/after each test

Types

This section is empty.

Jump to

Keyboard shortcuts

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