pub struct StructuredQuery {
pub from_ms: i64,
pub to_ms: i64,
pub gran: usize,
pub group_by: Vec<String>,
pub dim_group_by: Option<String>,
pub filters: FiltersBody,
pub dim_filters: BTreeMap<String, String>,
pub limit: Option<usize>,
}Expand description
The structured query endpoint’s request body (DW-043): a closed grammar translated to SQL — never SQL text from the caller.
SCALE-10 (#190): dim_group_by opens ad-hoc grouping over a
captured custom dimension (bounded cardinality). When set, the
query reads from rollup_dim instead of rollup_fixed, grouping
by the dimension’s values.
Fields§
§from_ms: i64§to_ms: i64§gran: usizeGranularity index 0..=3 (1m/5m/1h/1d).
group_by: Vec<String>Dimension columns to group by (closed set; empty = one totals row).
dim_group_by: Option<String>SCALE-12 (#190): custom dimension name to group by. When set,
the query reads from rollup_dim grouped by the dimension’s
values. Bounded to the configured custom dimensions’
cardinality (the rollup_dim table’s primary key).
filters: FiltersBodyEquality filters on dimension columns.
dim_filters: BTreeMap<String, String>SCALE-12 (#190): equality filters on custom dimensions. The
key is the dimension name, the value is the required value.
Applied as a semi-join against rollup_dim.
limit: Option<usize>Maximum returned rows (default 1000, hard cap 10 000).
Implementations§
Source§impl StructuredQuery
impl StructuredQuery
Sourcepub fn validate(&self) -> Result<(), QueryError>
pub fn validate(&self) -> Result<(), QueryError>
Reject anything outside the closed grammar.
Trait Implementations§
Source§impl Debug for StructuredQuery
impl Debug for StructuredQuery
Source§impl<'de> Deserialize<'de> for StructuredQuery
impl<'de> Deserialize<'de> for StructuredQuery
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>,
Auto Trait Implementations§
impl Freeze for StructuredQuery
impl RefUnwindSafe for StructuredQuery
impl Send for StructuredQuery
impl Sync for StructuredQuery
impl Unpin for StructuredQuery
impl UnwindSafe for StructuredQuery
Blanket Implementations§
§impl<T> AnyExt for T
impl<T> AnyExt for T
§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind reference§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable reference§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointer§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointer§fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
T behind Box pointer§fn downcast_move<T>(this: Self) -> Option<T>
fn downcast_move<T>(this: Self) -> Option<T>
Self to T,
useful only in generic context as a workaround for specializationSource§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<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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