Enum wing_sqlparser::ast::ColumnOption [−][src]
pub enum ColumnOption {
Null,
NotNull,
Default(Expr),
Unique {
is_primary: bool,
},
ForeignKey {
foreign_table: ObjectName,
referred_columns: Vec<Ident>,
on_delete: Option<ReferentialAction>,
on_update: Option<ReferentialAction>,
},
Check(Expr),
DialectSpecific(Vec<Token>),
}
Expand description
ColumnOption
s are modifiers that follow a column definition in a CREATE TABLE
statement.
Variants
Null
NULL
NotNull
NOT NULL
Default(Expr)
Tuple Fields
0: Expr
DEFAULT <restricted-expr>
Unique
Fields
is_primary: bool
{ PRIMARY KEY | UNIQUE }
ForeignKey
Fields
foreign_table: ObjectName
on_delete: Option<ReferentialAction>
on_update: Option<ReferentialAction>
A referential integrity constraint ([FOREIGN KEY REFERENCES <foreign_table> (<referred_columns>) { [ON DELETE <referential_action>] [ON UPDATE <referential_action>] | [ON UPDATE <referential_action>] [ON DELETE <referential_action>] }
).
Check(Expr)
Tuple Fields
0: Expr
CHECK (<expr>)
DialectSpecific(Vec<Token>)
Dialect-specific options, such as:
- MySQL’s
AUTO_INCREMENT
or SQLite’sAUTOINCREMENT
- …
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 ColumnOption
impl Send for ColumnOption
impl Sync for ColumnOption
impl Unpin for ColumnOption
impl UnwindSafe for ColumnOption
Blanket Implementations
Mutably borrows from an owned value. Read more