Skip to main content

Table

Struct Table 

Source
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,
    pub is_private: bool,
    pub is_local_date_table: bool,
    pub is_template_date_table: 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: String

Table 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).

§is_hidden: bool

Hidden from report authors; hidden objects are still live if referenced.

§is_private: bool

Engine-private (TOM isPrivate): reserved for the engine, never authored against. Display-only metadata — never liveness.

§is_local_date_table: bool

An engine-generated auto date/time table serving one date column (TOM annotation __PBI_LocalDateTable; name-prefix fallback). Hidden machinery a report cannot author against directly. Display-only metadata — never liveness; the graph layer reads it for the auto-date/time verdict (DependencyGraph::auto_date_time_tables).

§is_template_date_table: bool

The engine-generated date table template the LocalDateTable_* family is derived from (TOM annotation __PBI_TemplateDateTable; name-prefix fallback). Display-only metadata — never liveness; see Self::is_local_date_table.

Implementations§

Source§

impl Table

Source

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§

Source§

impl Clone for Table

Source§

fn clone(&self) -> Table

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Table

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Table

Source§

fn default() -> Table

Returns the “default value” for a type. Read more
Source§

impl Eq for Table

Source§

impl PartialEq for Table

Source§

fn eq(&self, other: &Table) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.