Data access
id_effect_sql provides driver-agnostic SQL as Effect values — the Rust analogue of @effect/sql.
Core traits
SqlClient—connect,query,execute,beginwith_transaction— commit/rollback scopeTestSqlClient— scriptable in-memory double
PostgreSQL production access lives in id_effect_sql_pg. Driver choice ADR: docs/platform/adrs/adr-sql-driver-choice.md.
Axum integration
Run queries inside id_effect_axum::routing handlers with shared Arc<dyn SqlClient> state:
cargo run -p id_effect_sql --example 010_axum_sql
Keep SQL in context modules; inject SqlClient via capability providers at the host boundary (Part II).
See also
- Mission:
platform-data