Struct barrel::table::Column [] [src]

pub struct Column {
    pub unique: bool,
    pub indexed: bool,
    pub nullable: bool,
    pub increments: bool,
    pub _type: Type,
    pub def: Option<ColumnDefault>,
}

Fields

Is this a unique key

Should the database create an index

Can this column be NULL

Does it auto-increment

What's the column type

What's default value records in this column

Methods

impl Column
[src]

[src]

Lazy constructor mostly used in unit tests

[src]

Set a default value for this column

[src]

Set a column to allow being null

[src]

Setup this column to automatically increment (such as integers)

Throws an error if the column type can't increment (like booleans)

Trait Implementations

impl Clone for Column
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Column

impl Sync for Column