PostgreSQL Driver
QAIL Zig implements PostgreSQL directly over the wire protocol. The active surface includes:
- plain TCP connections
- connection timeouts
- TLS transport
- startup/auth handling for cleartext, MD5, SCRAM, and enterprise auth hooks
- prepared statement execution
- pipeline execution
- connection pooling
- COPY helpers
- LISTEN / NOTIFY
- logical replication core
- RLS helper APIs
Primary Types
qail.driver.driver.PgDriverqail.driver.connection.Connectionqail.driver.pipeline.Pipelineqail.driver.pool.PgPool
Driver Direction
The focus of qail-zig is not a SQL-string convenience wrapper. The serious path is:
- build AST or validated command input
- encode PostgreSQL protocol frames directly
- execute over a pure-Zig transport path
- fail closed on protocol and state-machine violations
Current Emphasis
Recent work concentrated on hardening the PG driver instead of broadening surface area first. That includes startup/auth state validation, protocol framing checks, COPY sequencing checks, replication stream fail-closed handling, and AST sanitization.
The current public driver surface keeps raw SQL and trusted compatibility helpers internal. Application code should enter through QailCmd, PgDriver, PgPool, Pipeline, COPY helpers, and documented connection options.