pub enum NullEquality {
NullEqualsNothing,
NullEqualsNull,
}
Expand description
Represents the behavior for null values when evaluating equality. Currently, its primary use case is to define the behavior of joins for null values.
§Examples
The following table shows the expected equality behavior for NullEquality
.
A | B | NullEqualsNothing | NullEqualsNull |
---|---|---|---|
NULL | NULL | false | true |
NULL | ‘b’ | false | false |
‘a’ | NULL | false | false |
‘a’ | ‘b’ | false | false |
§Order
The order on this type represents the “restrictiveness” of the behavior. The more restrictive a behavior is, the fewer elements are considered to be equal to null. NullEquality::NullEqualsNothing represents the most restrictive behavior.
This mirrors the old order with null_equals_null
booleans, as false
indicated that
null != null
.
Variants§
NullEqualsNothing
Null is not equal to anything (null != null
)
NullEqualsNull
Null is equal to null (null == null
)
Trait Implementations§
Source§impl Clone for NullEquality
impl Clone for NullEquality
Source§fn clone(&self) -> NullEquality
fn clone(&self) -> NullEquality
Returns a duplicate of the value. Read more
1.0.0 · 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 NullEquality
impl Debug for NullEquality
Source§impl Hash for NullEquality
impl Hash for NullEquality
Source§impl PartialEq for NullEquality
impl PartialEq for NullEquality
Source§impl PartialOrd for NullEquality
impl PartialOrd for NullEquality
impl Copy for NullEquality
impl Eq for NullEquality
impl StructuralPartialEq for NullEquality
Auto Trait Implementations§
impl Freeze for NullEquality
impl RefUnwindSafe for NullEquality
impl Send for NullEquality
impl Sync for NullEquality
impl Unpin for NullEquality
impl UnwindSafe for NullEquality
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more