AlterColumnOperation in sqlparser::ast - Rust

Enum AlterColumnOperation 

Source

pub enum AlterColumnOperation {
    SetNotNull,
    DropNotNull,
    SetDefault {
        value: Expr,
    },
    DropDefault,
    SetDataType {
        data_type: DataType,
        using: Option<Expr>,
        had_set: bool,
    },
    AddGenerated {
        generated_as: Option<GeneratedAs>,
        sequence_options: Option<Vec<SequenceOptions>>,
    },
}
Expand description

An ALTER COLUMN (Statement::AlterTable) operation

§

SET NOT NULL

§

DROP NOT NULL

§

SET DEFAULT <expr> Set the column default value.

Fields

Expression representing the new default value.

§

DROP DEFAULT

§

[SET DATA] TYPE <data_type> [USING <expr>]

Fields

Target data type for the column.

PostgreSQL-specific USING <expr> expression for conversion.

Set to true if the statement includes the SET DATA TYPE keywords.

§

ADD GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ]

Note: this is a PostgreSQL-specific operation.

Fields

Optional GENERATED AS specifier (e.g. ALWAYS or BY DEFAULT).

Optional sequence options for identity generation.

§
§
§
§
§
§