v0.1.0 — SQL Without the C
A pure-Go SQLite for Starlark — local, cross-platform, no cgo.
Features
- Low-level SQL with prepared statements and parameterized queries (injection-safe); batch execution; high-level table/record helpers; ATTACH/DETACH; schema introspection.
- Transactions (begin/commit/rollback) with
OperationResulterror handling — a failed statement returns a result, it does not terminate the script. - Custom SQL functions written in Starlark, callable directly inside queries; automatic SQLite↔Starlark type conversion.
- File-based and in-memory databases. Built on the pure-Go
modernc.org/sqlite— no cgo, builds on every platform (including Windows); on-disk files are standard-SQLite-compatible.
Hardening (opt-in; defaults unchanged — existing scripts run identically)
- Custom functions are panic-safe: a panicking Starlark function surfaces an error and can never crash the host.
max_rowsconfig (default0= unlimited) bounds result sizes when a host sets it.NewModuleWithFileAccess(false)confines scripts to in-memory / the host-configured database (enforced in bothconnect()andattach()), with strict in-memory DSN detection.
Notes
- go 1.19 floor. Pins:
starpkg/base v0.1.0,1set/starlet v0.2.1,1set/starlight v0.2.0,go.starlark.netecosystem baseline. - A pure-Go remote/online backend (a self-hosted libSQL
sqldor Turso Cloud) is planned for v0.2.0 — additive; the local path is unchanged.