-
Release v1.0.0 Stable
released this
2026-05-11 19:44:39 -06:00 | 1 commits to main since this releasev1.0.0
code.nochebuena.dev/go/sqliteOverview
sqlitev1.0.0 commits the database client API as stable. All v0.9.0 roadmap items are
validated in production. The module ships a pure-Go, CGO-free SQLite client backed by
modernc.org/sqlitethat integrates with thelauncherlifecycle andhealthcheck systems,
serialises write transactions through a mutex to preventSQLITE_BUSYerrors, and provides
UnitOfWorkfor transactional repository patterns via context injection.What Changed Since v0.9.0
No API changes. All micro-lib dependencies bumped from v0.9.0 to v1.0.0.
Roadmap items resolved
Item Resolution Read-only bypass for write mutex ❌ No — reads via GetExecutoralready bypasswriteMu; they go directly to*sql.DBconcurrently. A separate read handle would complicate the API without meaningful benefit for embedded workloadsWAL reader/writer pool separation ❌ No — requires two *sql.DBhandles and a routing layer; out of scope for single-process embedded use casePragmasas structured type❌ No — raw DSN string is more flexible and the defaults are well-documented; a struct adds complexity for marginal benefit Production feedback on write-mutex approach ✅ Validated — WAL + writeMuserialisation confirmed stable under real workloads; noSQLITE_BUSYincidentsFull API (stable)
Executor—ExecContext,QueryContext,QueryRowContextusingdatabase/sqlnative types.Tx— extendsExecutorwithCommit() error,Rollback() error(no context — honestdatabase/sqlcontract).Client—GetExecutor(ctx) Executor,Begin(ctx) (Tx, error),Ping(ctx) error,HandleError(err) error.Component—launcher.Component+health.Checkable+Client.UnitOfWork—Do(ctx, fn) error; acquireswriteMuand injects active*sql.Txvia context.Config—Path,MaxOpenConns,MaxIdleConns,Pragmas; env-tag support. Default Pragmas:?_journal=WAL&_timeout=5000&_fk=true.New(logger logz.Logger, cfg Config) Component— constructor; database opened inOnInit.NewUnitOfWork(logger logz.Logger, client Client) UnitOfWork— wraps aClientfor serialised transactionalDosemantics.HandleError(err error) error— maps SQLite extended error codes to xerrors:2067/1555(unique/primary-key) →ErrAlreadyExists;787(foreign key) →ErrInvalidInput;sql.ErrNoRows→ErrNotFound; others →ErrInternal.Migration from v0.9.0
No breaking changes. Only the micro-lib indirect dependency versions change.
go get code.nochebuena.dev/go/sqlite@v1.0.0Downloads