[][src]Enum sqlparser::ast::ColumnOption

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),
}

ColumnOptions are modifiers that follow a column definition in a CREATE TABLE statement.

Variants

Null

NULL

NotNull

NOT NULL

Default(Expr)

DEFAULT <restricted-expr>

Unique

{ PRIMARY KEY | UNIQUE }

Fields of Unique

is_primary: bool
ForeignKey

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>] }).

Fields of ForeignKey

foreign_table: ObjectNamereferred_columns: Vec<Ident>on_delete: Option<ReferentialAction>on_update: Option<ReferentialAction>
Check(Expr)

Trait Implementations

impl Clone for ColumnOption[src]

impl Debug for ColumnOption[src]

impl Display for ColumnOption[src]

impl Eq for ColumnOption[src]

impl Hash for ColumnOption[src]

impl PartialEq<ColumnOption> for ColumnOption[src]

impl StructuralEq for ColumnOption[src]

impl StructuralPartialEq for ColumnOption[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.