pub enum TableConstraint {
PrimaryKey(Vec<String>),
Unique(Vec<String>),
Check(CheckExpr),
ForeignKey {
columns: Vec<String>,
ref_table: String,
ref_columns: Vec<String>,
},
Exclude {
method: String,
elements: Vec<String>,
},
}Expand description
Table-level constraints
Variants§
PrimaryKey(Vec<String>)
Unique(Vec<String>)
Check(CheckExpr)
ForeignKey
FOREIGN KEY (cols) REFERENCES table(ref_cols)
Exclude
EXCLUDE USING method (…)
Trait Implementations§
Source§impl Clone for TableConstraint
impl Clone for TableConstraint
Source§fn clone(&self) -> TableConstraint
fn clone(&self) -> TableConstraint
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 moreAuto Trait Implementations§
impl Freeze for TableConstraint
impl RefUnwindSafe for TableConstraint
impl Send for TableConstraint
impl Sync for TableConstraint
impl Unpin for TableConstraint
impl UnwindSafe for TableConstraint
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