pub struct QueryResponse {
pub input: String,
pub format: String,
pub columns: Vec<String>,
pub rows: Vec<Map<String, Value>>,
pub row_count: usize,
pub truncated: bool,
}Expand description
query_sql response.
Fields§
§input: StringWhat the caller passed in, echoed back in human-readable form.
For single-file mode: "path/to/file.csv". For multi-file:
"customers=customers.csv, orders=orders.parquet".
format: StringLowercase extension of the (first) queried file. Empty when glob patterns mix multiple formats.
columns: Vec<String>Result column names in the order they appear in the projection.
rows: Vec<Map<String, Value>>Result rows as JSON objects keyed by column name.
row_count: usizeNumber of rows returned (after the row cap).
truncated: booltrue when the result was capped by the row limit and the
underlying query produced more rows. The LLM should use this
to decide whether to refine the SQL with a tighter WHERE
or LIMIT.
Trait Implementations§
Source§impl Debug for QueryResponse
impl Debug for QueryResponse
Auto Trait Implementations§
impl Freeze for QueryResponse
impl RefUnwindSafe for QueryResponse
impl Send for QueryResponse
impl Sync for QueryResponse
impl Unpin for QueryResponse
impl UnsafeUnpin for QueryResponse
impl UnwindSafe for QueryResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more