Struct bison_orm::builder::ColumnBuilder[][src]

pub struct ColumnBuilder { /* fields omitted */ }

The builder for column definitions in table creation

Implementations

impl ColumnBuilder[src]

pub fn new(name: impl Into<String>) -> Self[src]

Returns a new ColumnBuilder with the given name.

pub fn typ(&mut self, typ: impl Into<String>) -> &mut Self[src]

Sets the column type.

pub fn attr(&mut self, attr: &str) -> &mut Self[src]

Sets an extra attribute for the column, like UNIQUE or AUTO_INCREMENT.

pub fn constraint(
    &mut self,
    foreign: impl Into<Option<ForeignKeyBuilder>>
) -> &mut Self
[src]

Adds the CONSTRAINT clause to the ADD COLUMN statement in SQLite.

pub fn check<O, C>(&mut self, check: O) -> &mut Self where
    O: Into<Option<C>>,
    C: Fn(&mut BaseBuilder) + 'static, 
[src]

Adds a CHECK clause to the ADD COLUMN statement.

Trait Implementations

impl Builder for ColumnBuilder[src]

impl Default for ColumnBuilder[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> BuilderExt for T where
    T: ChildBuilder, 
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.