Struct sea_query::table::ColumnDef[][src]

pub struct ColumnDef { /* fields omitted */ }

Specification of a table column

Implementations

impl ColumnDef[src]

pub fn new<T: 'static>(name: T) -> Self where
    T: Iden
[src]

Construct a table column

pub fn not_null(mut self: Self) -> Self[src]

Set column not null

pub fn default<T>(mut self: Self, value: T) -> Self where
    T: Into<Value>, 
[src]

Set default value of a column

pub fn auto_increment(mut self: Self) -> Self[src]

Set column auto increment

pub fn unique_key(mut self: Self) -> Self[src]

Set column unique constraint

pub fn primary_key(mut self: Self) -> Self[src]

Set column as primary key

pub fn char_len(mut self: Self, length: u32) -> Self[src]

Set column type as char with custom length

pub fn char(mut self: Self) -> Self[src]

Set column type as char

pub fn string_len(mut self: Self, length: u32) -> Self[src]

Set column type as string with custom length

pub fn string(mut self: Self) -> Self[src]

Set column type as string

pub fn text(mut self: Self) -> Self[src]

Set column type as text

pub fn tiny_integer_len(mut self: Self, length: u32) -> Self[src]

Set column type as tiny_integer with custom length

pub fn tiny_integer(mut self: Self) -> Self[src]

Set column type as tiny_integer

pub fn small_integer_len(mut self: Self, length: u32) -> Self[src]

Set column type as small_integer with custom length

pub fn small_integer(mut self: Self) -> Self[src]

Set column type as small_integer

pub fn integer_len(mut self: Self, length: u32) -> Self[src]

Set column type as integer with custom length

pub fn integer(mut self: Self) -> Self[src]

Set column type as integer

pub fn big_integer_len(mut self: Self, length: u32) -> Self[src]

Set column type as big_integer with custom length

pub fn big_integer(mut self: Self) -> Self[src]

Set column type as big_integer

pub fn float_len(mut self: Self, precision: u32) -> Self[src]

Set column type as float with custom precision

pub fn float(mut self: Self) -> Self[src]

Set column type as float

pub fn double_len(mut self: Self, precision: u32) -> Self[src]

Set column type as double with custom precision

pub fn double(mut self: Self) -> Self[src]

Set column type as double

pub fn decimal_len(mut self: Self, precision: u32, scale: u32) -> Self[src]

Set column type as decimal with custom precision and scale

pub fn decimal(mut self: Self) -> Self[src]

Set column type as decimal

pub fn date_time_len(mut self: Self, precision: u32) -> Self[src]

Set column type as date_time with custom precision

pub fn date_time(mut self: Self) -> Self[src]

Set column type as date_time

pub fn timestamp_len(mut self: Self, precision: u32) -> Self[src]

Set column type as timestamp with custom precision

pub fn timestamp(mut self: Self) -> Self[src]

Set column type as timestamp

pub fn time_len(mut self: Self, precision: u32) -> Self[src]

Set column type as time with custom precision

pub fn time(mut self: Self) -> Self[src]

Set column type as time

pub fn date(mut self: Self) -> Self[src]

Set column type as date

pub fn binary_len(mut self: Self, length: u32) -> Self[src]

Set column type as binary with custom length

pub fn binary(mut self: Self) -> Self[src]

Set column type as binary

pub fn boolean(mut self: Self) -> Self[src]

Set column type as boolean

pub fn money_len(mut self: Self, precision: u32, scale: u32) -> Self[src]

Set column type as money with custom precision ans scale

pub fn money(mut self: Self) -> Self[src]

Set column type as money

pub fn json(mut self: Self) -> Self[src]

Set column type as json. On MySQL, this is equivalent to json_binary. On MariaDB, this is equivalent to text. On PgSQL, this is equivalent to json.

pub fn json_binary(mut self: Self) -> Self[src]

Set column type as json binary. On MySQL, this is equivalent to json. On MariaDB, this is equivalent to text. On PgSQL, this is equivalent to jsonb.

pub fn custom<T: 'static>(mut self: Self, n: T) -> Self where
    T: Iden
[src]

Trait Implementations

impl Clone for ColumnDef[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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.