Tags: justrach/turboAPI
Tags
v1.0.17: raw pg.zig queries, LRU cache, pool rotation, pipelining (#61) * feat: raw pg.zig query path from Python + bool param fix Two changes: 1. Updated pg.zig fork (bool param encoding fix for []const u8 values) - Fixes #59: pg_type query with boolean params no longer crashes 2. Added _db_query_raw C API for direct pg.zig queries without HTTP - Fixes #60: TurboPG can now query Postgres directly via Zig - db.query_native() bypasses the HTTP server entirely - Enables fair driver-to-driver benchmarks against asyncpg Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: cache _db_query_raw availability at init, not per-call Move hasattr check from _query_native() to _connect(). Stores result in self._native_raw bool. Zero overhead on the query hot path. The HTTP path (db_get/db_query decorators) never touches turbopg/client.py - it goes server.zig -> handleDbRoute -> db.zig directly. So the raw query path has zero impact on HTTP performance. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: update pg.zig to include LRU cache, pool rotation, pipelining Points to perf/zero-copy-and-lru-cache branch with: - Bounded LRU stmt cache (256 max, evicts oldest) - Pool connection rotation (max_queries, max_lifetime) - Query pipelining (batch multiple queries in one round trip) - Bool param encoding fix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * v1.0.17: raw pg.zig query path, LRU stmt cache, pool rotation, pipelining - feat: _db_query_raw C API for direct pg.zig queries without HTTP (#60) - fix: boolean param encoding in pg.zig fork (#59) - perf: bounded LRU stmt cache (256 max, evicts oldest) - perf: pool connection rotation (max_queries, max_lifetime) - feat: query pipelining (batch queries in one round trip) - refactor: cache _native_raw at init, zero per-call overhead Benchmarks: 1.25x faster than asyncpg on concurrent queries, 151k+ req/s on HTTP path (no regression). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PreviousNext