Expand description
SQL Abstract Syntax Tree (AST) types for table constraints
Structs§
- Check
Constraint - A
CHECKconstraint ([ CONSTRAINT <name> ] CHECK (<expr>) [[NOT] ENFORCED]). - Constraint
Using Index - PostgreSQL constraint that promotes an existing unique index to a table constraint.
- Exclusion
Constraint - PostgreSQL
EXCLUDEconstraint:[ CONSTRAINT <name> ] EXCLUDE [ USING <index_method> ] ( <element> WITH <operator> [, ...] ) [ INCLUDE (<cols>) ] [ WHERE (<predicate>) ] - Exclusion
Element - One element in an
EXCLUDEconstraint’s element list:<expr> WITH <operator> - Foreign
KeyConstraint - A referential integrity constraint (
[ CONSTRAINT <name> ] FOREIGN KEY (<columns>) REFERENCES <foreign_table> (<referred_columns>) [ MATCH { FULL | PARTIAL | SIMPLE } ] { [ON DELETE <referential_action>] [ON UPDATE <referential_action>] | [ON UPDATE <referential_action>] [ON DELETE <referential_action>] }). - Full
Text OrSpatial Constraint - MySQLs fulltext definition. Since the
SPATIALdefinition is exactly the same, and MySQL displays both the same way, it is part of this definition as well. - Index
Constraint - MySQLs index definition for index creation. Not present on ANSI so, for now, the usage is restricted to MySQL, as no other dialects that support this syntax were found.
- Primary
KeyConstraint - MySQL definition for
PRIMARY KEYconstraints statements: - Unique
Constraint - Unique constraint definition.
Enums§
- Table
Constraint - A table-level constraint, specified in a
CREATE TABLEor anALTER TABLE ADD <constraint>statement.