db

package
v0.0.0-...-1a4ab3d Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *sql.DB

DB is the global database connection

Functions

func Close

func Close() error

Close closes the database connection

func Initialize

func Initialize(dbPath string) error

Initialize sets up the database connection

func Transaction

func Transaction(fn func(*sql.Tx) error) error

Transaction begins a transaction and executes the provided function. The transaction is committed if the function returns nil, otherwise it is rolled back.

Types

This section is empty.

Jump to

Keyboard shortcuts

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