pub struct CalQuery {
pub version: CalVersion,
pub statement: CalStatement,
pub pipeline: Vec<PipelineStage>,
pub with_options: Vec<WithOption>,
pub format: Option<FormatClause>,
pub let_bindings: Vec<LetBinding>,
pub user_vars: HashMap<String, String>,
pub let_values: HashMap<String, Vec<String>>,
pub warnings: Vec<CalWarning>,
}Expand description
A fully parsed CAL query — version prefix + statement + optional pipeline.
Fields§
§version: CalVersionExplicit version prefix, if present. Defaults to CAL/1.
statement: CalStatementThe core statement.
pipeline: Vec<PipelineStage>Pipeline stages applied after the statement (| SELECT ..., etc.).
with_options: Vec<WithOption>WITH options (e.g. WITH superseded, WITH score_breakdown).
format: Option<FormatClause>FORMAT spec (e.g. FORMAT json, FORMAT [markdown, json]).
let_bindings: Vec<LetBinding>LET bindings extracted before the statement (e.g.
LET $x = SUBJECTS OF (...)).
user_vars: HashMap<String, String>WITH VARS { "key": "value", ... } — user-injected display variables.
These are string-only values accessible in FORMAT TEMPLATE via {{$key}}
syntax. They do NOT affect query execution — display only.
let_values: HashMap<String, Vec<String>>LET bindings after evaluation, keyed by name without the $.
Execution state, not query text, so it is never serialized: the parser
leaves this empty and the executor fills it once the bindings have run.
It exists because $friends in WHERE subject IN $friends has to
become a list of values somewhere, and threading a scope object through
every statement executor to do it would touch far more surface than
carrying the answer on the query does.
warnings: Vec<CalWarning>Warnings emitted during parsing (non-fatal).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CalQuery
impl<'de> Deserialize<'de> for CalQuery
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>,
impl StructuralPartialEq for CalQuery
Auto Trait Implementations§
impl Freeze for CalQuery
impl RefUnwindSafe for CalQuery
impl Send for CalQuery
impl Sync for CalQuery
impl Unpin for CalQuery
impl UnsafeUnpin for CalQuery
impl UnwindSafe for CalQuery
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
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> ⓘ
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> ⓘ
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