Struct sea_query::table::ColumnDef [−][src]
pub struct ColumnDef { /* fields omitted */ }
Specification of a table column
Implementations
impl ColumnDef
[src]
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 !RefUnwindSafe for ColumnDef
impl !UnwindSafe for ColumnDef
impl !UnwindSafe for ColumnDef