Enum models_parser::ast::TableConstraint [−][src]
pub enum TableConstraint {
Unique(Unique),
ForeignKey(ForeignKey),
Check(Check),
}
Expand description
A table-level constraint, specified in a CREATE TABLE
or an
ALTER TABLE ADD <constraint>
statement.
Variants
Unique(Unique)
[ CONSTRAINT <name> ] { PRIMARY KEY | UNIQUE } (<columns>)
Tuple Fields of Unique
0: Unique
ForeignKey(ForeignKey)
A referential integrity constraint ([ CONSTRAINT <name> ] FOREIGN KEY (<columns>) REFERENCES <foreign_table> (<referred_columns>) { [ON DELETE <referential_action>] [ON UPDATE <referential_action>] | [ON UPDATE <referential_action>] [ON DELETE <referential_action>] }
).
Tuple Fields of ForeignKey
0: ForeignKey
Check(Check)
[ CONSTRAINT <name> ] CHECK (<expr>)
Tuple Fields of Check
0: Check
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for TableConstraint
impl Send for TableConstraint
impl Sync for TableConstraint
impl Unpin for TableConstraint
impl UnwindSafe for TableConstraint
Blanket Implementations
Mutably borrows from an owned value. Read more