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

pub struct ColumnDef { /* fields omitted */ }
Expand description

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(self) -> Self[src]

Set column not null

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

Set default value of a column

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

Set column auto increment

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

Set column unique constraint

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

Set column as primary key

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

Set column type as char with custom length

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

Set column type as char

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

Set column type as string with custom length

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

Set column type as string

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

Set column type as text

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

Set column type as tiny_integer with custom length

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

Set column type as tiny_integer

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

Set column type as small_integer with custom length

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

Set column type as small_integer

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

Set column type as integer with custom length

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

Set column type as integer

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

Set column type as big_integer with custom length

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

Set column type as big_integer

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

Set column type as float with custom precision

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

Set column type as float

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

Set column type as double with custom precision

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

Set column type as double

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

Set column type as decimal with custom precision and scale

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

Set column type as decimal

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

Set column type as date_time with custom precision

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

Set column type as date_time

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

Set column type as timestamp with custom precision

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

Set column type as timestamp

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

Set column type as time with custom precision

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

Set column type as time

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

Set column type as date

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

Set column type as binary with custom length

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

Set column type as binary

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

Set column type as boolean

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

Set column type as money with custom precision ans scale

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

Set column type as money

pub fn json(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(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>(self, n: T) -> Self where
    T: Iden
[src]

Use a custom type on this column.

pub fn extra(self, string: String) -> Self[src]

Some extra options in custom string

Trait Implementations

impl Clone for ColumnDef[src]

fn clone(&self) -> ColumnDef[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for ColumnDef[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl !RefUnwindSafe for ColumnDef

impl !Send for ColumnDef

impl !Sync for ColumnDef

impl Unpin for ColumnDef

impl !UnwindSafe for ColumnDef

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V