pub enum FieldTarget {
Column {
table: NameKey,
column: NameKey,
},
Measure {
home_table: Option<NameKey>,
measure: NameKey,
},
HierarchyLevel {
table: NameKey,
hierarchy: NameKey,
level: NameKey,
via_column: Option<NameKey>,
via_variation: Option<NameKey>,
},
Aggregation {
function: Option<String>,
inner: Box<FieldTarget>,
},
Written(FieldRef),
}Expand description
A model-object reference as written in a report binding, before resolution.
PBIR bindings are structured JSON entity trees (Column, Measure,
HierarchyLevel, Aggregation); legacy Layout binds written names. Both
normalize here, so downstream code never branches on source format.
The column/measure discrimination is kept rather than collapsed into
FieldRef, because the binding states it outright and resolution would
otherwise be guessing.
Variants§
Column
A column, by its table (SourceRef.Entity) and name (Property).
Measure
A measure, by name. Measures are model-global; the entity PBIR writes alongside them is the home table as displayed, carried for provenance only.
Fields
HierarchyLevel
A hierarchy level: the level a visual drills to, which keeps the whole hierarchy (and its level columns) alive.
Fields
table: NameKeyOwning table as written. For a hierarchy reached over a column variation this is the varied (base) table; the hierarchy itself lives on the variation’s target table.
via_column: Option<NameKey>The varied column (PBIR PropertyVariationSource.Property), when
the hierarchy is reached over a column variation — the key that
joins this binding to the model-side
crate::model::Column::variations declaration.
Aggregation
An aggregation over an inner reference, e.g. Sum of 'Sales'[Units].
The inner target is what stays alive; the function is diagnostics.
Fields
inner: Box<FieldTarget>The aggregated field.
Written(FieldRef)
A written name the parser could not structure — legacy Layout strings, unresolved query aliases. Kept anyway: a binding we cannot read is still a binding, and dropping it would under-count roots.
Trait Implementations§
Source§impl Clone for FieldTarget
impl Clone for FieldTarget
Source§fn clone(&self) -> FieldTarget
fn clone(&self) -> FieldTarget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FieldTarget
impl Debug for FieldTarget
Source§impl Display for FieldTarget
impl Display for FieldTarget
impl Eq for FieldTarget
Source§impl Hash for FieldTarget
impl Hash for FieldTarget
Source§impl PartialEq for FieldTarget
impl PartialEq for FieldTarget
impl StructuralPartialEq for FieldTarget
Auto Trait Implementations§
impl Freeze for FieldTarget
impl RefUnwindSafe for FieldTarget
impl Send for FieldTarget
impl Sync for FieldTarget
impl Unpin for FieldTarget
impl UnsafeUnpin for FieldTarget
impl UnwindSafe for FieldTarget
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.