database

package
v0.0.0-...-4a11927 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(_ context.Context, uri string) (*sql.DB, error)

Connect creates a new instance of a SQLite database from the input URI. This URI can be empty (or ":memory:", if the caller wishes to run the database in-memory.

func Migrate

func Migrate(ctx context.Context, db *sql.DB, logger Logger) error

Migrate updates an instance of a database to the latest schema and its modifications, by running chronologically ordered migrations

Types

type Logger

type Logger interface {
	InfoContext(ctx context.Context, msg string, args ...any)
}

Jump to

Keyboard shortcuts

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