ColumnDefinition in oxide_sql_core::migrations - Rust

Struct ColumnDefinition 

Source

pub struct ColumnDefinition {
    pub name: String,
    pub data_type: DataType,
    pub nullable: bool,
    pub default: Option<DefaultValue>,
    pub primary_key: bool,
    pub unique: bool,
    pub autoincrement: bool,
    pub references: Option<ForeignKeyRef>,
    pub check: Option<String>,
    pub collation: Option<String>,
}
Expand description

A complete column definition for migrations.

Column name.

Data type.

Whether the column is nullable.

Default value.

Whether this is a primary key.

Whether this column is unique.

Whether this column auto-increments.

Foreign key reference, if any.

Check constraint expression, if any.

Collation for string columns.

Source§
Source§
Source§
Source§

Tests for self and other values to be equal, and is used by ==.

1.0.0 · Source§

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Source§

§
§
§
§
§
§