sqliteutil

package
v0.0.397 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveDBPathOverride

func ResolveDBPathOverride(pathOverride string, defaultPath func() (string, error)) (string, error)

ResolveDBPathOverride expands and absolutizes an optional SQLite database path. An empty override delegates to defaultPath; :memory: is returned unchanged.

func WithImmediateMigrationTx

func WithImmediateMigrationTx(ctx context.Context, db *sql.DB, fn func(Executor) error) (err error)

WithImmediateMigrationTx runs fn in a SQLite BEGIN IMMEDIATE transaction.

Types

type Executor

type Executor interface {
	Exec(query string, args ...any) (sql.Result, error)
	Query(query string, args ...any) (*sql.Rows, error)
}

Executor is the query surface exposed to a migration transaction.

Jump to

Keyboard shortcuts

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