pub struct Table {
pub name: String,
pub columns: Vec<Column>,
pub measures: Vec<Measure>,
pub partitions: Vec<Partition>,
pub hierarchies: Vec<Hierarchy>,
pub calendars: Vec<Calendar>,
pub calculation_group: Option<CalculationGroup>,
pub detail_rows_expression: Option<String>,
pub is_hidden: bool,
}Expand description
A table and everything defined on it.
A calculation-group table carries its synthetic columns (the group’s field column
and its ordinal column) in columns like any other table; nothing distinguishes
them structurally from data columns.
Fields§
§name: StringTable name.
columns: Vec<Column>Columns in source order.
measures: Vec<Measure>Measures whose home table this is.
partitions: Vec<Partition>Partitions supplying the table’s rows.
hierarchies: Vec<Hierarchy>User-defined hierarchies.
calendars: Vec<Calendar>Calendars (TOM calendars) binding groups of the table’s columns.
calculation_group: Option<CalculationGroup>In TOM a calculation group is a property of a table.
detail_rows_expression: Option<String>DAX defaultDetailRowsDefinition (drillthrough detail rows).
Hidden from report authors; hidden objects are still live if referenced.
Implementations§
Source§impl Table
impl Table
Sourcepub fn is_calculated(&self) -> bool
pub fn is_calculated(&self) -> bool
A calculated table is a table whose partition source is DAX.
There is no flag for this in TOM, and none here: the partition decides.
§Examples
use ripbi_core::{Partition, PartitionSource, Table};
let top_products = Table {
name: "Top Products".to_string(),
partitions: vec![Partition {
name: "Top Products".to_string(),
source: PartitionSource::Calculated {
expression: "TOPN(10, Products, Products[Sales])".to_string(),
},
}],
..Default::default()
};
assert!(top_products.is_calculated());
// An imported table is not, however it was loaded.
let imported = Table {
name: "Products".to_string(),
partitions: vec![Partition {
name: "Products".to_string(),
source: PartitionSource::M { expression: "Sql.Database(...)".to_string() },
}],
..Default::default()
};
assert!(!imported.is_calculated());Trait Implementations§
impl Eq for Table
impl StructuralPartialEq for Table
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnsafeUnpin for Table
impl UnwindSafe for Table
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
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
Compare self to
key and return true if they are equal.