arcature-data
The Arcature high-level data layer over arcature-db (AP2.1-6, ADR-0006).
A high-level model/query experience for ordinary CRUD over SeaORM, preserving
the SeaORM and SQLx escape hatches. No new database engine, no ORM, no hidden
global pool, no task-local connection, and no request-global DB. Every public
API takes the Db handle by reference — ownership is explicit on every call.
This crate is an internal workspace member (publish = false); its public
surface is re-exported through the arcature facade behind the existing db
feature. ADR-0006 authorizes no new public crate for AP2.1-6.
Features
- Explicit-ownership query ergonomics —
Entity::query(&db)(a blanketQueryModeltrait; no app-side trait impl), with.filter(),.order_by(),.limit(),.offset(),.paginate(), and eager-load (Relation::of::<R>()). - Typed transactions —
Transaction::orm(SeaORM) andTransaction::sqlx(raw SQLx), explicit&Db, no hidden nesting/savepoint magic. - N+1 detection (behind the
n1feature) — a request-scopedTrackerwith source attribution, zero production hot-path overhead when off. - Migration lint —
classify/classify_statements: a deterministic, database-free classifier of real PostgreSQL migration risks.
Postgres
arcature-data does not open connections — it borrows arcature-db::Db.
See the crate rustdoc (cargo doc -p arcature-data --no-deps --open) for the
full API, the request lifecycle, and the security note.