pub struct NamespaceConstraint {
pub table: String,
pub index: String,
pub origin: ConstraintOrigin,
pub columns: Vec<Option<String>>,
pub partial: bool,
}Expand description
One uniqueness constraint in which namespace participates.
Fields§
§table: String§index: StringThe index backing it. Implicit primary-key indexes are named by SQLite
(sqlite_autoindex_<table>_<n>).
origin: ConstraintOrigin§columns: Vec<Option<String>>Key columns in index order. None is an expression, which has no column
name — the shape both hand enumerations were blind to.
partial: boolA partial index (... WHERE ...). Its constraint binds only the rows its
predicate admits, so a collision check that ignores this refuses moves
SQLite would have accepted.
Implementations§
Source§impl NamespaceConstraint
impl NamespaceConstraint
Sourcepub fn columns_are_nameable(&self) -> bool
pub fn columns_are_nameable(&self) -> bool
True when every key column is a plain column name, so a caller can build a collision query from this constraint alone.
Trait Implementations§
Source§impl Clone for NamespaceConstraint
impl Clone for NamespaceConstraint
Source§impl Debug for NamespaceConstraint
impl Debug for NamespaceConstraint
impl Eq for NamespaceConstraint
Source§impl Ord for NamespaceConstraint
impl Ord for NamespaceConstraint
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for NamespaceConstraint
impl PartialEq for NamespaceConstraint
Source§impl PartialOrd for NamespaceConstraint
impl PartialOrd for NamespaceConstraint
impl StructuralPartialEq for NamespaceConstraint
Auto Trait Implementations§
impl Freeze for NamespaceConstraint
impl RefUnwindSafe for NamespaceConstraint
impl Send for NamespaceConstraint
impl Sync for NamespaceConstraint
impl Unpin for NamespaceConstraint
impl UnsafeUnpin for NamespaceConstraint
impl UnwindSafe for NamespaceConstraint
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> Comparable<K> for Q
impl<Q, K> Comparable<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
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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