Querying & DML
execute_query(...) runs SQL over the KalamDB HTTP API and returns a QueryResponse.
HTTP queries do not require connect().
Parameterized queries
Use $1, $2, … placeholders and pass serde_json::Value parameters:
Parameters are JSON-encoded. Use explicit SQL casts when you need richer server-side types.
Namespaces
Pass the namespace as the fourth argument when SQL uses unqualified table names:
Background: SQL Reference: Namespaces.
Reading results
Named rows (recommended)
rows_as_maps() returns Vec<HashMap<String, KalamCellValue>>.
Convenience helpers
Multiple statements
Positional rows
response.rows() returns Vec<Vec<KalamCellValue>> when you prefer index-based access.
DML: INSERT / UPDATE / DELETE
All SQL goes through execute_query:
Check response.success() and inspect response.error on failure.
File uploads and downloads
Enable the file-uploads feature (or native-full):
Upload with FileUpload and execute_with_files:
After querying FILE columns, bind table context with TableId and download bytes:
See FILE Columns & Uploads for the full FileRef, BoundFileRef, and download API.
Progress callbacks
execute_query_with_progress(...) reports query execution progress for long-running statements when the server emits progress frames.