pub struct QuerySqlRequest {
pub path: Option<String>,
pub tables: Option<HashMap<String, String>>,
pub sql: String,
pub limit: Option<usize>,
}Expand description
Input for the query_sql tool.
Single-file mode: pass path and reference the file as table data.
Multi-file mode: pass tables mapping LLM-chosen names → relative paths,
then JOIN them in sql. Mutually exclusive — pick one shape per call.
Glob patterns (*, ?, [...]) are supported in both modes — the
SQL backend expands them at read time. They stay bounded by
--root because the path validator rejects .. and absolute
paths up-front.
Fields§
§path: Option<String>Single-file shortcut. Registered as table data.
tables: Option<HashMap<String, String>>Multi-file mode: map of table name → relative path (or glob). Each entry is registered as a SQL table in the same query session so the LLM can JOIN across files.
sql: StringThe SQL query.
limit: Option<usize>Cap on returned rows. Defaults to 100; capped at 1000.
Trait Implementations§
Source§impl Debug for QuerySqlRequest
impl Debug for QuerySqlRequest
Source§impl<'de> Deserialize<'de> for QuerySqlRequest
impl<'de> Deserialize<'de> for QuerySqlRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for QuerySqlRequest
impl JsonSchema for QuerySqlRequest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for QuerySqlRequest
impl RefUnwindSafe for QuerySqlRequest
impl Send for QuerySqlRequest
impl Sync for QuerySqlRequest
impl Unpin for QuerySqlRequest
impl UnsafeUnpin for QuerySqlRequest
impl UnwindSafe for QuerySqlRequest
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