database

package
v0.0.0-...-49189e4 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	DB *sql.DB
}

Database wraps the sql.DB connection and provides helper methods

func NewSQLiteDB

func NewSQLiteDB(databasePath string) (*Database, error)

NewSQLiteDB creates a new SQLite database connection

func (*Database) Close

func (d *Database) Close() error

Close closes the database connection

func (*Database) Health

func (d *Database) Health() error

Health checks if the database connection is healthy

type Migration

type Migration struct {
	ID          int
	Description string
	SQL         string
}

Migration represents a database migration

Jump to

Keyboard shortcuts

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