sqlite

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine's cfg.Database is the .db file path — SQLite has no host/port/ user/password, so it reuses the field every other engine already uses for "what to back up" instead of introducing a second convention.

func (*Engine) Backup

Backup uses SQLite's own "VACUUM INTO" (SQLite >= 3.27), which produces a transactionally consistent full copy safe under concurrent writers — the online-backup-API equivalent, without needing a CGo binding of sqlite3_backup_init.

func (*Engine) Close

func (e *Engine) Close() error

func (*Engine) Connect

func (e *Engine) Connect(ctx context.Context, cfg driver.ConnectionConfig) error

func (*Engine) IncrementalBasis

func (e *Engine) IncrementalBasis() driver.IncrementalBasisKind

func (*Engine) Ping

func (e *Engine) Ping(ctx context.Context) error

func (*Engine) Restore

func (e *Engine) Restore(ctx context.Context, opts driver.RestoreOptions) error

Restore is a plain file copy to opts.Database, written atomically via a temp file + rename so a reader never observes a half-written .db file.

func (*Engine) SupportsDifferential

func (e *Engine) SupportsDifferential() bool

func (*Engine) SupportsIncremental

func (e *Engine) SupportsIncremental() bool

func (*Engine) SupportsSelective

func (e *Engine) SupportsSelective() bool

SupportsSelective is false: a single-file database has no per-table restore via this interface — ATTACH + INSERT SELECT is a possible future feature, not built here.

Jump to

Keyboard shortcuts

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