Struct bison_orm::builder::TableBuilder[][src]

pub struct TableBuilder { /* fields omitted */ }

A query builder for CREATE TABLE statements.

Implementations

impl TableBuilder[src]

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

Returns a query builder for the CREATE TABLE statement.

pub fn if_not_exists(&mut self) -> &mut Self[src]

Appends the IF NOT EXISTS clause to the CREATE TABLE statement.

pub fn column(&mut self, column: ColumnBuilder) -> &mut Self[src]

Appends the given column to the CREATE TABLE statement.

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

Adds a column to the primary-key constraint in the statement.

pub fn foreign_key(&mut self, key: ForeignKeyBuilder) -> &mut Self[src]

Adds a foreign-key to the statement (without constraints).

pub fn constraint(&mut self, mut constraint: ForeignKeyBuilder) -> &mut Self[src]

Adds a foreign-key constraint to the statement.

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

Sets the CHARACTER SET clause to the statement. MySQL only.

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

Sets the COLLATE clause to the statement. MySQL only.

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

Adds additional options to to the statement (MySQL only).

Trait Implementations

impl Builder for TableBuilder[src]

impl Default for TableBuilder[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.