store

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package store opens the SQLite database (pure-Go modernc driver, CGO-free) and runs embedded migrations transactionally (plan §2, §9). It sets a 0077 umask before open so the -wal/-shm side files are never group/world readable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Inspect

func Inspect(path string) (int, error)

Inspect opens path READ-ONLY and returns the highest recorded schema version, erroring if the file is not a Mooring database (missing/empty schema_meta). Unlike Open it never creates or migrates — restore uses it to reject a blank or foreign archive before it would otherwise be installed as the live DB.

Types

type DB

type DB struct {
	*sql.DB
	Path string
}

DB wraps *sql.DB with the helpers the rest of the binary uses.

func Open

func Open(path string) (*DB, error)

Open opens (creating if needed) the SQLite DB at path with the plan-mandated pragmas and runs all pending migrations.

Jump to

Keyboard shortcuts

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