pub struct DriftConfig {
pub type_inconsistency_threshold: f64,
pub ghost_key_threshold: f64,
pub sparse_field_threshold: f64,
pub missing_key_threshold: f64,
pub detect_schema_evolution: bool,
}Expand description
Configuration for drift detection thresholds
TODO: Make these thresholds configurable via:
- Config file (~/.config/pgdrift/config.toml or .pgdrift.toml in project root)
- Command-line arguments (–ghost-key-threshold, –sparse-field-threshold, etc.)
Current hardcoded thresholds can cause boundary issues when field density is exactly at a threshold (e.g., 80%). User-configurable thresholds would allow tuning for specific use cases and avoid false positives/negatives.
Fields§
§type_inconsistency_threshold: f64Minimum percentage for minority type to trigger type inconsistency (default: 5.0%)
ghost_key_threshold: f64Maximum density for ghost key detection (default: 0.10 = 10%)
sparse_field_threshold: f64Maximum density for sparse field detection (default: 0.80 = 80%)
missing_key_threshold: f64Minimum density for missing key detection (default: 0.95 = 95%)
detect_schema_evolution: boolWhether to detect schema evolution patterns
Trait Implementations§
Source§impl Clone for DriftConfig
impl Clone for DriftConfig
Source§fn clone(&self) -> DriftConfig
fn clone(&self) -> DriftConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DriftConfig
impl Debug for DriftConfig
Auto Trait Implementations§
impl Freeze for DriftConfig
impl RefUnwindSafe for DriftConfig
impl Send for DriftConfig
impl Sync for DriftConfig
impl Unpin for DriftConfig
impl UnsafeUnpin for DriftConfig
impl UnwindSafe for DriftConfig
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