Skip to content

v0.1.0 — SQL Without the C

Choose a tag to compare

@vt128 vt128 released this 14 Jun 17:03
2408327

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 OperationResult error 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/sqliteno 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_rows config (default 0 = unlimited) bounds result sizes when a host sets it.
  • NewModuleWithFileAccess(false) confines scripts to in-memory / the host-configured database (enforced in both connect() and attach()), 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.net ecosystem baseline.
  • A pure-Go remote/online backend (a self-hosted libSQL sqld or Turso Cloud) is planned for v0.2.0 — additive; the local path is unchanged.