Skip to main content

Module sql

Module sql 

Source
Expand description

pond_sql_query: read-only DataFusion SQL over the three Lance tables (sessions / messages / parts), registered as LanceTableProviders on a fresh per-call SessionContext. Read-only is enforced in two layers - a single-SELECT pre-parse and sql_with_options with DDL/DML/statements all disabled - so no statement that mutates the corpus or touches the filesystem (INSERT/UPDATE/DELETE/CREATE/DROP/COPY/CREATE EXTERNAL TABLE/SET) can run. Results render inline (row-capped) or export to a parquet/ndjson file the caller fetches via the pond-sql-export:// resource (src/transport.rs).

Structs§

Tables
The three Lance datasets, fetched fresh per call so each query sees a current snapshot (the handle freshness gate runs on each Store::dataset).

Enums§

Format
Export serialization format. Vector columns are excluded and JSON columns are decoded to text before encoding (see [displayable]).
Mode
How pond_sql_query returns results.
Outcome
Result of a successful run.
SqlError
Two error channels: Query is caller-fixable (parse/plan/exec/limits) and the tool surfaces it as an isError result so the model self-corrects; Infra is an internal failure surfaced as a protocol error.

Constants§

DEFAULT_INLINE_ROWS
Default inline row cap when the caller passes no limit.
MAX_INLINE_ROWS
Upper bound on the caller-supplied inline limit.

Functions§

run
Execute one read-only SQL query and return either a rendered table, a JSON payload, or encoded export bytes.