Skip to content

Releases: starpkg/sqlite

v0.2.0 — SQL, Near and Far

Choose a tag to compare

@vt128 vt128 released this 14 Jun 18:09
2a110fa

Remote/online libSQL databases — additive, and still pure-Go.

New

  • connect_remote(url, auth_token?) — connect to a remote libSQL server, either a self-hosted sqld or Turso Cloud, over a pure-Go client (no cgo). It returns the same Database object as connect(), so every existing method — query / execute / insert / transactions / schema ops — works over the remote database.
  • Self-hostable end to end: point connect_remote at your own open-source sqld, or at Turso Cloud — same client, same SQLite dialect; on-disk files stay standard-SQLite-compatible.

Unchanged (backward compatible)

  • The local engine is still pure-Go modernc.org/sqlite — no cgo, builds on every platform; existing scripts run identically.

Notes

  • go floor 1.19 → 1.20 (the pure-Go libSQL client requires it). modernc.org/sqlite upgraded v1.24.0 → v1.31.1.
  • Verified end-to-end against both a local Docker sqld and Turso Cloud.

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.