pub enum GeneratorConfig {
Show 14 variants
UuidV4,
Sequential {
start: i64,
},
Pattern {
pattern: String,
},
IntRange {
min: i64,
max: i64,
},
FloatRange {
min: f64,
max: f64,
},
DecimalRange {
min: f64,
max: f64,
},
TimestampRange {
start: String,
end: String,
},
TimestampNow,
WeightedBool {
true_weight: f64,
},
OneOf {
values: Vec<Value>,
},
SampleArray {
pool: Vec<String>,
min_length: usize,
max_length: usize,
},
Static {
value: Value,
},
Null,
DurationRange {
min_secs: u64,
max_secs: u64,
},
}Expand description
Generator configuration for a field.
This enum defines the different types of value generators available for producing test data.
Variants§
UuidV4
Generate UUIDs (v4)
Sequential
Generate sequential integers
Pattern
Generate values using a pattern with placeholders
IntRange
Generate random integers in a range
FloatRange
Generate random floats in a range
DecimalRange
Generate random decimals in a range
TimestampRange
Generate timestamps in a range
TimestampNow
Generate current timestamp at generation time
This generator produces the current UTC timestamp when the row is generated.
Useful for updated_at or created_at fields where the actual insert time
is needed (e.g., for Neo4j incremental sync which filters by timestamp).
Note: This is NOT deterministic - each generation produces a different value.
WeightedBool
Generate weighted boolean values
OneOf
Generate random selection from a pool of values
SampleArray
Generate arrays by sampling from a pool
Fields
Static
Generate a static value
Null
Generate null values (for nullable fields)
DurationRange
Generate random durations in a range (in seconds)
Trait Implementations§
Source§impl Clone for GeneratorConfig
impl Clone for GeneratorConfig
Source§fn clone(&self) -> GeneratorConfig
fn clone(&self) -> GeneratorConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more