pub enum ExpressionOwner<'a> {
Table {
table: &'a str,
},
Column {
table: &'a str,
column: &'a str,
},
Measure {
table: &'a str,
measure: &'a str,
},
Partition {
table: &'a str,
partition: &'a str,
},
Role {
role: &'a str,
},
CalculationItem {
table: &'a str,
item: &'a str,
},
Expression {
name: &'a str,
},
Function {
name: &'a str,
},
ReportMeasure {
measure: &'a str,
},
}Expand description
The model or report object an enumerated expression belongs to.
Names are borrowed from the AST, so enumerating a model’s expressions
allocates nothing. Call to_object_id to
materialize a graph node key — once per node the graph actually creates, rather
than once per expression.
The variants are exactly the objects that can own an expression, which is why
there is no hierarchy here: hierarchies reference columns but define no DAX.
The one report-side variant is the report-level measure, whose DAX body is an
expression source the model knows nothing about (see
crate::report::ReportModel::dax_expressions).
Variants§
Table
A table, owning its detail-rows expression.
Column
A calculated column.
Measure
A measure, owning its expression, format string, detail rows, and KPI.
Partition
A partition, owning its M or DAX source query.
Role
A security role, owning its row-level-security filters.
CalculationItem
A calculation item.
Expression
A model-level shared M expression.
Function
A user-defined DAX function.
ReportMeasure
A report-level measure (reportExtensions.json), owning its expression and dynamic format string. Lives in the report, not the model.
Implementations§
Source§impl ExpressionOwner<'_>
impl ExpressionOwner<'_>
Sourcepub fn to_object_id(&self) -> ObjectId
pub fn to_object_id(&self) -> ObjectId
The owner’s stable graph-node identity, allocating the owned name keys.
Trait Implementations§
Source§impl<'a> Clone for ExpressionOwner<'a>
impl<'a> Clone for ExpressionOwner<'a>
Source§fn clone(&self) -> ExpressionOwner<'a>
fn clone(&self) -> ExpressionOwner<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for ExpressionOwner<'a>
Source§impl<'a> Debug for ExpressionOwner<'a>
impl<'a> Debug for ExpressionOwner<'a>
impl<'a> Eq for ExpressionOwner<'a>
Source§impl<'a> Hash for ExpressionOwner<'a>
impl<'a> Hash for ExpressionOwner<'a>
Source§impl<'a> PartialEq for ExpressionOwner<'a>
impl<'a> PartialEq for ExpressionOwner<'a>
impl<'a> StructuralPartialEq for ExpressionOwner<'a>
Auto Trait Implementations§
impl<'a> Freeze for ExpressionOwner<'a>
impl<'a> RefUnwindSafe for ExpressionOwner<'a>
impl<'a> Send for ExpressionOwner<'a>
impl<'a> Sync for ExpressionOwner<'a>
impl<'a> Unpin for ExpressionOwner<'a>
impl<'a> UnsafeUnpin for ExpressionOwner<'a>
impl<'a> UnwindSafe for ExpressionOwner<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.