Commit Graph

3 Commits

Author SHA1 Message Date
451a089d58 chore: bump go directive from 1.25 to 1.26 2026-05-12 02:06:46 +00:00
bc99d76944 feat(sqlite)!: promote to v1.0.0 — validate write-mutex approach, bump all deps to v1.0.0
All v0.9.0 roadmap items evaluated in production. WAL + write-mutex serialisation validated
under real workloads; no API changes needed. Read/write pool separation and Pragmas structured
type deferred as out-of-scope for this use case tier. Bump all micro-lib dependencies (logz,
health, launcher, xerrors) from v0.9.0 to v1.0.0. API committed as stable.
2026-05-11 19:44:08 -06:00
237cba9bad feat(sqlite): initial stable release v0.9.0
Pure-Go CGO-free SQLite client with launcher lifecycle, write-mutex serialisation, health check, unit-of-work via context injection, and structured error mapping.

What's included:
- Executor / Tx / Client / Component interfaces using database/sql native types
- Tx.Commit() / Tx.Rollback() without ctx, matching the honest database/sql contract
- New(logger, cfg) constructor; database opened in OnInit
- Config struct with env-tag support; default Pragmas: WAL + 5s busy timeout + FK enforcement
- PRAGMA foreign_keys = ON enforced explicitly in OnInit
- writeMu sync.Mutex acquired by UnitOfWork.Do to serialise writes and prevent SQLITE_BUSY
- UnitOfWork via context injection; GetExecutor(ctx) returns active Tx or *sql.DB
- HandleError mapping SQLite extended error codes to xerrors codes (unique/primary-key → AlreadyExists, foreign-key → InvalidInput, ErrNoRows → NotFound)
- health.Checkable at LevelCritical; pure-Go modernc.org/sqlite driver (CGO_ENABLED=0 compatible)

Tested-via: todo-api POC integration
Reviewed-against: docs/adr/
2026-03-19 13:25:31 +00:00