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]
T: Iden,
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]
T: Into<Value>,
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]
T: Iden,
Use a custom type on this column.
pub fn extra(self, string: String) -> Self
[src]
Some extra options in custom string
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,