Enum sqlite3_parser::ast::ColumnConstraint
source · pub enum ColumnConstraint {
PrimaryKey {
order: Option<SortOrder>,
conflict_clause: Option<ResolveType>,
auto_increment: bool,
},
NotNull {
nullable: bool,
conflict_clause: Option<ResolveType>,
},
Unique(Option<ResolveType>),
Check(Expr),
Default(Expr),
Defer(DeferSubclause),
Collate {
collation_name: Name,
},
ForeignKey {
clause: ForeignKeyClause,
deref_clause: Option<DeferSubclause>,
},
Generated {
expr: Expr,
typ: Option<Id>,
},
}
Expand description
Column constraint
Variants§
PrimaryKey
PRIMARY KEY
Fields
§
conflict_clause: Option<ResolveType>
ON CONFLICT
clause
NotNull
NULL
Unique(Option<ResolveType>)
UNIQUE
Check(Expr)
CHECK
Default(Expr)
DEFAULT
Defer(DeferSubclause)
DEFERRABLE
Collate
COLLATE
ForeignKey
REFERENCES
foreign-key clause
Generated
GENERATED
Trait Implementations§
source§impl Clone for ColumnConstraint
impl Clone for ColumnConstraint
source§fn clone(&self) -> ColumnConstraint
fn clone(&self) -> ColumnConstraint
Returns a copy 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 ColumnConstraint
impl Debug for ColumnConstraint
source§impl PartialEq for ColumnConstraint
impl PartialEq for ColumnConstraint
source§fn eq(&self, other: &ColumnConstraint) -> bool
fn eq(&self, other: &ColumnConstraint) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToTokens for ColumnConstraint
impl ToTokens for ColumnConstraint
impl Eq for ColumnConstraint
impl StructuralPartialEq for ColumnConstraint
Auto Trait Implementations§
impl Freeze for ColumnConstraint
impl RefUnwindSafe for ColumnConstraint
impl Send for ColumnConstraint
impl Sync for ColumnConstraint
impl Unpin for ColumnConstraint
impl UnwindSafe for ColumnConstraint
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.