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 ¶
var ErrNilBash = errors.New("sqlite: nil *Bash")
ErrNilBash is returned by Register when called with a nil *Bash.
Functions ¶
func Register ¶
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.