Help us shape the future of Go! Take the 2026 Go Developer Survey

sqlite

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package sqlite is the OPTIONAL `sqlite3` runtime for go-bash. Import this package and call Register to replace the Phase 10 Wave H stub with a real, pure-Go SQLite driver (modernc.org/sqlite).

The package adheres to the no-cgo policy: modernc.org/sqlite is a pure-Go transpilation of upstream SQLite, so `CGO_ENABLED=0` builds continue to succeed.

Cited surface: the spec

Index

Constants

This section is empty.

Variables

View Source
var ErrNilBash = errors.New("sqlite: nil *Bash")

ErrNilBash is returned by Register when called with a nil *Bash.

Functions

func Register

func Register(b *gobash.Bash, opts Options) error

Register installs the real sqlite3 command on b, overriding the Phase 10 Wave H placeholder builtin. Subsequent Exec calls dispatch `sqlite3` to the modernc.org/sqlite-backed implementation.

Register is safe to call once per *Bash. Repeated calls overwrite the registry entry (last-writer-wins, per command.Registry.Register). Calling Register before any Exec is the supported pattern; the registry mutator is not concurrent-safe.

A nil Bash returns ErrNilBash.

Types

type Options

type Options struct {
	// Timeout caps the wall-clock duration of a single sqlite3
	// invocation. When ≤ 0 the per-Exec ResolvedLimits.MaxSqliteTimeout
	// is used; when both are ≤ 0 no timeout is enforced.
	Timeout time.Duration
}

Options configures the sqlite3 runtime. The zero value is valid: the command falls back to ResolvedLimits.MaxSqliteTimeout.

Jump to

Keyboard shortcuts

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