ORM & Extended Query
The HTTP path is the production integration today. Native wire protocol and Extended Query (parameterized statements) are separate roadmaps; this page states what is verified with real drivers and what remains planned.
SQLAlchemy adapter (v1)
AxisRoutingSession is a routing session adapter for the HTTP path: writes route through AXIS, reads go direct. It is a v1 adapter, not a universal ORM solution — not every ORM query shape is guaranteed to map cleanly, and raw writes must be policy-visible.
Real driver verification matrix
| Driver | Mode | Result |
|---|---|---|
| psycopg3 | single-statement via AXIS | 37 passed (2026-07-05) |
| asyncpg | single-statement via AXIS | 37 passed (2026-07-05) |
| Prisma | single-statement via AXIS | 37 passed (2026-07-05) |
| pgJDBC | single-statement via AXIS | 37 passed (2026-07-05) |
| pgJDBC | batch (extended protocol) | Supported — pipelining enabled (PIPELINING_SUPPORT=true) with bounded batch size (AXIS_PGWIRE_MAX_BATCH_ITEMS); verified end-to-end for Hibernate 6 + pgjdbc (explicit-OID binds, multi Bind/Execute before one Sync, savepoint/rollback) with signed audit evidence; denied batch items fail closed with connection recovery; oversized batches rejected |
| COPY (any driver) | copy mode | Fail-closed — rejected before AXIS enters the CopyData sub-protocol; COPY PROGRAM always blocked |
These tests are lab results from the integration test suite; they prove single-statement enforcement through AXIS with real drivers, not universal ORM compatibility.
Pipelining and batch (2026-08)
Pipelining is enabled (PIPELINING_SUPPORT=true) with a bounded batch size (AXIS_PGWIRE_MAX_BATCH_ITEMS). The 2026-07-05 recon captured pgjdbc batch traffic through a TCP capture proxy before any production test code was added:
| Client path | Captured pattern | Result |
|---|---|---|
JDBC executeBatch() INSERT (3 rows, assumeMinServerVersion=12) | P/P/B/D/E/B/D/E/B/D/E/S — 3 Bind/Execute before one Sync | Clean rejection at recon (42501/unsupported_extended_pipeline); now supported with bounded batch size |
JDBC executeBatch() UPDATE / DELETE (3 rows) | P/P/B/D/E×3/S — 3 Bind/Execute before one Sync | Clean policy rejection (42501); same connection then executed SELECT 1 |
Prisma 6.19.3 $transaction([...]) and interactive $transaction | Max 1 Bind + 1 Execute before Sync (no same-cycle pipelining) | Policy-denied writes rolled back; client recovered |
Prisma 6.19.3 createMany() / updateMany() / deleteMany() | Single Bind/Execute before Sync | One multi-row INSERT succeeded; UPDATE/DELETE policy-denied, rolled back |
JDBC startup no longer requires assumeMinServerVersion=12; whitelisted startup GUC application_name is allowed. Oversized batches are rejected and denied batch items fail closed with connection recovery. CI keeps batch success, denied-item fail-closed recovery, and size-bound rejection tests (round-8 ORM ground-truth evidence).
Extended Query (EQ) roadmap
Parameterized statements (Extended Query protocol) are planned, not shipped. The lab POC implements Simple Query (Q messages) with direct text and is documented as experimental.
| Item | Status |
|---|---|
Q (Simple Query) intercept & enforce | Experimental lab POC |
P/B/E (Parse/Bind/Execute) interception | Planned (EQ0–EQ5) |
| Bind-value inspection for fail-closed classification | Planned |
| EQ required before OLTP pilot | Documented requirement (RFC-032 context) |
Fail-closed behavior for unsupported shapes
- Prepared statements in HTTP mode: AXIS-side
PREPARE/EXECUTEsession store;EXECUTEwithout a resolvable session fails safe as unresolved. - Extended-protocol parameter bypass attempts →
PARSE_REJECTED_UNTRUSTED_INPUT. - COPY, multi-statement payloads → blocked by default; COPY is rejected before the CopyData sub-protocol.
- Unsupported SQL shapes → classified
Unknown→ Write/Block defaults.
JDBC batch support is verified in the lab with a bounded batch size. Extended Query (P/B/E beyond the batch pipeline), COPY and full ORM compatibility remain roadmap items; production OLTP pilots must still use the HTTP path with single statements.
Related: Native PG Wire Protocol · API Reference · Testing & Verification