database

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

Close closes the database connection.

func Open

func Open(cfg Config) (*sql.DB, error)

Open creates a new SQLite connection and runs migrations. Uses a mutex instead of sync.Once so that transient failures can be retried.

func Reset added in v0.0.4

func Reset()

Reset resets the singleton for testing purposes.

Types

type Config

type Config struct {
	Path string // Path to the SQLite database file
}

Config holds database configuration.

Jump to

Keyboard shortcuts

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