pub struct ImportSpec {
pub query: String,
pub dimensions: Vec<DimensionMapping>,
pub value_column: String,
pub measure_id: MeasureId,
pub measure_name: String,
pub item_id_base: u32,
pub refresh_policy: RefreshPolicy,
}Expand description
How to map a query’s result columns onto model elements.
Each dimensions entry names a result column that becomes a category
(its distinct values become items); value_column names the column that
becomes the imported measure’s numeric value. A row therefore contributes
one input cell: measure[dim=val, …] = value_column.
Fields§
§query: StringSQL SELECT to run against the connection.
dimensions: Vec<DimensionMapping>Result-column name → the category it maps to (name + id).
value_column: StringThe result column holding the numeric measure value.
measure_id: MeasureIdThe measure to create/populate for the value column.
measure_name: String§item_id_base: u32Base id for minting item ids; items get sequential ids from here.
refresh_policy: RefreshPolicyHow the resulting measure should refresh (default Manual).
Auto Trait Implementations§
impl Freeze for ImportSpec
impl RefUnwindSafe for ImportSpec
impl Send for ImportSpec
impl Sync for ImportSpec
impl Unpin for ImportSpec
impl UnsafeUnpin for ImportSpec
impl UnwindSafe for ImportSpec
Blanket Implementations§
impl<T> Allocation for T
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