codlet-sqlx
SQLite storage adapters for codlet, backed by SQLx (RFC-011).
Status
Pre-release (v0.5.0). SQLite support is implemented and passes the full
codlet-conformance suite, including the concurrent-claim race test. PostgreSQL
support is planned for a later release.
Usage
use ;
use CodeStore;
async
Atomicity guarantee
Code claim and form-token consume use a single conditional UPDATE … WHERE … AND <guard> followed by an affected-row count check. SQLite's serialised write
mode makes these atomic within one process. See RFC-022 for the full isolation
requirements.
Migration
run_migrations embeds the SQL and uses IF NOT EXISTS, so it is safe to call
on every startup. Host applications own the migration application order; codlet
tables must never contain foreign keys into host-domain tables (RFC-011 §10.4).
Conformance
All three stores pass the codlet-conformance suite:
run_code_store_conformance, run_session_store_conformance,
run_form_token_store_conformance — including the concurrent-claim winner test
(RFC-022, RFC-023).
License
Apache-2.0