Enum sql_parser::ast::ColumnOption [−][src]
pub enum ColumnOption<T: AstInfo> {
Null,
NotNull,
Default(Expr<T>),
Unique {
is_primary: bool,
},
ForeignKey {
foreign_table: UnresolvedObjectName,
referred_columns: Vec<Ident>,
},
Check(Expr<T>),
}Expand description
ColumnOptions are modifiers that follow a column definition in a CREATE TABLE statement.
Variants
Null
NULL
NotNull
NOT NULL
Default(Expr<T>)
Tuple Fields
0: Expr<T>DEFAULT <restricted-expr>
Unique
Fields
is_primary: bool{ PRIMARY KEY | UNIQUE }
ForeignKey
A referential integrity constraint ([FOREIGN KEY REFERENCES <foreign_table> (<referred_columns>)).
Check(Expr<T>)
Tuple Fields
0: Expr<T>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<T> RefUnwindSafe for ColumnOption<T> where
<T as AstInfo>::Id: RefUnwindSafe,
<T as AstInfo>::ObjectName: RefUnwindSafe,
impl<T> Send for ColumnOption<T> where
<T as AstInfo>::Id: Send,
<T as AstInfo>::ObjectName: Send,
impl<T> Sync for ColumnOption<T> where
<T as AstInfo>::Id: Sync,
<T as AstInfo>::ObjectName: Sync,
impl<T> Unpin for ColumnOption<T> where
<T as AstInfo>::ObjectName: Unpin,
impl<T> UnwindSafe for ColumnOption<T> where
<T as AstInfo>::Id: UnwindSafe,
<T as AstInfo>::ObjectName: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Formats an object with the “alternative” format ({:#}) and returns it.
Compare self to key and return true if they are equal.
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more