v0.12.2
Performance: faster PostgreSQL validation.
- A validate() against a PostgreSQL URI now opens one connection instead of three (shared across preplan, execution, and introspection).
- Redundant SQL round-trips removed:
COUNT(*)is folded into the tally aggregate (the whole contract becomes a single query), the compiled plan supplies required columns instead of aninformation_schemalookup, and preplan catalog queries are skipped when no rule can be resolved from metadata. - Small-table validation is substantially faster locally (exact-count path ~40ms → ~8ms).
Behavior note: in the default fail-fast mode, total_rows and derived rates are now taken from the PostgreSQL reltuples estimate rather than a separate exact COUNT(*). Rule pass/fail and failed_count are unchanged; only fail-fast totals/rates may now be estimates (fail-fast results are already lower bounds). Use tally=True for exact totals.