database

package
v0.0.0-...-3c9273c Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checkpoint

func Checkpoint(db *sql.DB) error

Checkpoint checkpoints pending WAL pages on an open database connection.

func CheckpointWAL

func CheckpointWAL(dbPath string) error

CheckpointWAL checkpoints pending WAL pages into the main database file.

func EnsureSchema

func EnsureSchema(db *sql.DB) error

EnsureSchema creates the tables and indexes required by OAA Monitor.

func GetDatabaseSize

func GetDatabaseSize(dbPath string) (string, error)

GetDatabaseSize returns the size of the database file in a human-readable format

func Open

func Open(dbPath string) (*sql.DB, error)

Open opens a SQLite database with the repository's standard pragmas.

Types

type DB

type DB struct {
	*sql.DB
}

DB wraps the sql.DB connection and provides methods for database operations

func New

func New(dbPath string) (*DB, error)

New creates and returns a new DB instance

func (*DB) Close

func (db *DB) Close() error

Close closes the database connection

Jump to

Keyboard shortcuts

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