pub struct FunctionalDependence {
pub source_indices: Vec<usize>,
pub target_indices: Vec<usize>,
pub nullable: bool,
pub mode: Dependency,
}
Expand description
This object defines a functional dependence in the schema. A functional dependence defines a relationship between determinant keys and dependent columns. A determinant key is a column, or a set of columns, whose value uniquely determines values of some other (dependent) columns. If two rows have the same determinant key, dependent columns in these rows are necessarily the same. If the determinant key is unique, the set of dependent columns is equal to the entire schema and the determinant key can serve as a primary key. Note that a primary key may “downgrade” into a determinant key due to an operation such as a join, and this object is used to track dependence relationships in such cases. For more information on functional dependencies, see: https://www.scaler.com/topics/dbms/functional-dependency-in-dbms/
Fields§
§source_indices: Vec<usize>
§target_indices: Vec<usize>
§nullable: bool
Flag indicating whether one of the source_indices
can receive NULL values.
For a data source, if the constraint in question is Constraint::Unique
,
this flag is true
. If the constraint in question is Constraint::PrimaryKey
,
this flag is false
.
Note that as the schema changes between different stages in a plan,
such as after LEFT JOIN or RIGHT JOIN operations, this property may
change.
mode: Dependency
Implementations§
Trait Implementations§
Source§impl Clone for FunctionalDependence
impl Clone for FunctionalDependence
Source§fn clone(&self) -> FunctionalDependence
fn clone(&self) -> FunctionalDependence
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FunctionalDependence
impl Debug for FunctionalDependence
Source§impl PartialEq for FunctionalDependence
impl PartialEq for FunctionalDependence
impl Eq for FunctionalDependence
impl StructuralPartialEq for FunctionalDependence
Auto Trait Implementations§
impl Freeze for FunctionalDependence
impl RefUnwindSafe for FunctionalDependence
impl Send for FunctionalDependence
impl Sync for FunctionalDependence
impl Unpin for FunctionalDependence
impl UnwindSafe for FunctionalDependence
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.