sqlite

package
v0.0.0-...-7646b62 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*sql.DB
	// contains filtered or unexported fields
}

DB is a migrate.Store for the SQLite database at a path.

func New

func New(dbFile string) *DB

New returns a DB for the database at dbFile, a path or a "file:" URI. Call Open before passing it to migrate.New.

func (*DB) Close

func (db *DB) Close() error

func (*DB) CreateMetaCheckpointsIfNotExists

func (db *DB) CreateMetaCheckpointsIfNotExists(ctx context.Context) error

func (*DB) CreateMetaIfNotExists

func (db *DB) CreateMetaIfNotExists(ctx context.Context) error

func (*DB) DeleteMetaCheckpoints

func (db *DB) DeleteMetaCheckpoints(ctx context.Context) error

func (*DB) ForeignKeyViolations

func (db *DB) ForeignKeyViolations(
	ctx context.Context,
	limit int,
) (_ []migrate.ForeignKeyViolation, err error)

ForeignKeyViolations reads PRAGMA foreign_key_check, which reports every dangling reference whether or not foreign keys are enforced, stopping after limit rows.

func (*DB) GetMetaCheckpoints

func (db *DB) GetMetaCheckpoints(
	ctx context.Context,
	filename string,
) (_ []string, err error)

func (*DB) GetMigrations

func (db *DB) GetMigrations(
	ctx context.Context,
) (_ []migrate.Migration, err error)

func (*DB) InsertMetaCheckpoint

func (db *DB) InsertMetaCheckpoint(
	ctx context.Context,
	filename, content, checksum string,
	idx int,
) error

func (*DB) InsertMigration

func (db *DB) InsertMigration(ctx context.Context, filename, content, checksum string) error

func (*DB) Open

func (db *DB) Open() error

Source Files

  • sqlite.go

Jump to

Keyboard shortcuts

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