sqlitevfs

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JournalModeDelete = "DELETE"
	JournalModeWAL    = "WAL"
)

Variables

This section is empty.

Functions

func Open

func Open(ctx context.Context, remote RemoteFS, remotePath string, opts Options) (*sql.DB, io.Closer, error)

Types

type Options

type Options struct {
	ReadOnly bool
	// JournalMode, when set, is the journal mode the database is normalized to
	// (e.g. JournalModeDelete). When empty the database keeps its own mode, so a
	// live database's WAL header is never silently rewritten.
	JournalMode string
}

type RemoteFS

type RemoteFS interface {
	OpenFile(name string, flag int) (RemoteFile, error)
	Remove(name string) error
	Stat(name string) (os.FileInfo, error)
}

type RemoteFile

type RemoteFile interface {
	io.Closer
	io.ReaderAt
	io.WriterAt
	Truncate(size int64) error
	Sync() error
	Stat() (os.FileInfo, error)
}

Jump to

Keyboard shortcuts

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