Expand description
LIMIT 0 dry-run helper.
Wraps arbitrary user SQL in a CTE and runs it against the shared
CompileTimeDb, returning the ResultSchema without touching any rows.
§Critical: query execution is lazy (Phase 0 S6)
Connection::execute_query() does NOT run the query on the TCP transport.
The query only executes — and server errors / the RowDescription (schema)
only arrive — when Rowset::next_chunk() first pulls bytes. Therefore:
execute_query(sql).is_err()alone always looksOk.- This helper calls
next_chunk()once to force execution, then readsRowset::schema().
Functions§
- dry_run
- Wrap
user_sqlin aLIMIT 0CTE and return the projectedResultSchema.