pub enum ColumnConstraint<'bump> {
PrimaryKey {
order: Option<SortOrder>,
conflict_clause: Option<ResolveType>,
auto_increment: bool,
},
NotNull {
nullable: bool,
conflict_clause: Option<ResolveType>,
},
Unique(Option<ResolveType>),
Check(Expr<'bump>),
Default(Expr<'bump>),
Defer(DeferSubclause),
Collate {
collation_name: Name<'bump>,
},
ForeignKey {
clause: ForeignKeyClause<'bump>,
defer_clause: Option<DeferSubclause>,
},
Generated {
expr: Expr<'bump>,
typ: Option<Id<'bump>>,
},
}Expand description
Column constraint
Variants§
PrimaryKey
PRIMARY KEY
Fields
§
conflict_clause: Option<ResolveType>ON CONFLICT clause
NotNull
NULL
Unique(Option<ResolveType>)
UNIQUE
Check(Expr<'bump>)
CHECK
Default(Expr<'bump>)
DEFAULT
Defer(DeferSubclause)
DEFERRABLE
Collate
COLLATE
ForeignKey
REFERENCES foreign-key clause
Generated
GENERATED
Trait Implementations§
Source§impl<'bump> Debug for ColumnConstraint<'bump>
impl<'bump> Debug for ColumnConstraint<'bump>
impl<'bump> Eq for ColumnConstraint<'bump>
Source§impl<'bump> PartialEq for ColumnConstraint<'bump>
impl<'bump> PartialEq for ColumnConstraint<'bump>
Source§fn eq(&self, other: &ColumnConstraint<'bump>) -> bool
fn eq(&self, other: &ColumnConstraint<'bump>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'bump> StructuralPartialEq for ColumnConstraint<'bump>
Auto Trait Implementations§
impl<'bump> !RefUnwindSafe for ColumnConstraint<'bump>
impl<'bump> !Send for ColumnConstraint<'bump>
impl<'bump> !Sync for ColumnConstraint<'bump>
impl<'bump> !UnwindSafe for ColumnConstraint<'bump>
impl<'bump> Freeze for ColumnConstraint<'bump>
impl<'bump> Unpin for ColumnConstraint<'bump>
impl<'bump> UnsafeUnpin for ColumnConstraint<'bump>
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<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.