database

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(ctx context.Context, migrations fs.FS, cacheDir string) (*sqlc.Queries, *sql.DB, error)

Open opens (or creates) the SQLite database and returns ready-to-use Queries and the underlying connection. cacheDir is the muxac cache directory (e.g. ~/.cache/muxac); the database file is stored at cacheDir/db. migrations is an fs.FS containing SQL migration files (e.g. from go:embed).

func SetupTestDB

func SetupTestDB(t *testing.T) *sqlc.Queries

func SetupTestDBWithConn added in v0.0.4

func SetupTestDBWithConn(t *testing.T) (*sqlc.Queries, *sql.DB)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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