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]

Lazy constructor mostly used in unit tests

Set a default value for this column

Set a column to allow being null

Setup this column to automatically increment (such as integers)

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

Trait Implementations

impl Debug for Column
[src]

Formats the value using the given formatter. Read more

impl Clone for Column
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Column

impl Sync for Column