storage

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package storage opens SQLite databases and moves their schema forward.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(ctx context.Context, db *sql.DB, set string, fsys fs.FS, dir string) error

Migrate applies the *.sql files in dir of fsys that have not run yet, in name order, each in its own transaction. What has run is kept per set in surface_migrations, so several sets (the core's, the agent's) can share one database.

func MigrateCore

func MigrateCore(ctx context.Context, db *sql.DB) error

MigrateCore applies the core's own schema.

func Open

func Open(ctx context.Context, path string) (*sql.DB, error)

Open opens (creating it, mode 0600) the SQLite database at path, in WAL mode with foreign keys on.

Types

This section is empty.

Jump to

Keyboard shortcuts

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