pub enum ColumnGen {
Field {
field: &'static Field,
modifier: String,
transform: Transform,
range: Option<RangeSpec>,
ordering: Ordering,
omit_pct: Option<u8>,
zipf: Option<ZipfSpec>,
},
Literal(String),
Aggr {
func: AggrFunc,
source_col: String,
group_by: Option<String>,
},
Ref {
source_col: String,
modifier: String,
},
Expr {
left: ExprOperand,
op: ExprOp,
right: ExprOperand,
result_type: ExprResultType,
},
Fk {
parent_table: String,
parent_col_name: String,
parent_field: &'static Field,
parent_modifier: String,
parent_range: Option<RangeSpec>,
parent_ordering: Ordering,
parent_count: u64,
distribution: FkDistribution,
parent_domain_hash: u64,
parent_ctx: Box<ParentCtx>,
},
FkDeref {
anchor_col: String,
deref_col_name: String,
deref_field: &'static Field,
deref_modifier: String,
deref_range: Option<RangeSpec>,
deref_ordering: Ordering,
deref_domain_hash: u64,
parent_ctx: Box<ParentCtx>,
},
}Variants§
Field
Fields
Literal(String)
Aggr
Ref
Expr
Fk
Foreign-key anchor: samples a row from the parent table and generates the parent field value.
parent_domain_hash is zero at parse time; set by finalize_fk_columns.
Fields
§
parent_ordering: OrderingOrdering of the parent column (asc/desc/none). Propagated into
the GenContext used to regenerate the parent field value, otherwise
monotonic fields like timestamp:asc fall back to random output.
§
distribution: FkDistributionFkDeref
Foreign-key dereference: reuses the row index sampled by an Fk anchor column
in this table to generate a different field of the same parent row.
deref_domain_hash is zero at parse time; set by finalize_fk_columns.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ColumnGen
impl RefUnwindSafe for ColumnGen
impl Send for ColumnGen
impl Sync for ColumnGen
impl Unpin for ColumnGen
impl UnsafeUnpin for ColumnGen
impl UnwindSafe for ColumnGen
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