pub enum Query {
Simple {
source: Source,
filters: Vec<Filter>,
aggregates: Vec<Aggregate>,
directives: Directives,
params: Params,
sample: Option<f64>,
},
Compute {
left: Box<Query>,
right: Box<Query>,
name: Metric,
op: ComputeFunction,
aggregates: Vec<Aggregate>,
directives: Directives,
params: Params,
},
}Expand description
A Query AST representing a query in the MPL language
Variants§
Simple
A simple query that will produce a result
Fields
§
directives: DirectivesThe directives
Compute
A compute query taking the input of two queries and producing a by computing combined values
Fields
§
op: ComputeFunctionThe compute operation used to combine the left and right queries
§
directives: DirectivesThe directives
Implementations§
Source§impl Query
impl Query
Sourcepub fn directives(&self) -> &Directives
pub fn directives(&self) -> &Directives
Get a ref to the directives of the query.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Query
impl<'de> Deserialize<'de> for Query
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
Auto Trait Implementations§
impl Freeze for Query
impl !RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnsafeUnpin for Query
impl !UnwindSafe for Query
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