pub struct ColumnOptions {
pub limit: Option<usize>,
pub nullable: bool,
pub default: Option<String>,
pub auto_increment: bool,
pub unique: bool,
pub comment: Option<String>,
pub precision: Option<(u32, u32)>,
pub after: Option<String>,
}Expand description
列选项构建器(Phinx 风格链式配置)
Fields§
§limit: Option<usize>§nullable: bool§default: Option<String>§auto_increment: bool§unique: bool§comment: Option<String>§precision: Option<(u32, u32)>§after: Option<String>Implementations§
Source§impl ColumnOptions
impl ColumnOptions
Sourcepub fn default_value(self, value: impl Into<String>) -> Self
pub fn default_value(self, value: impl Into<String>) -> Self
设置默认值
Sourcepub fn auto_increment(self) -> Self
pub fn auto_increment(self) -> Self
设置为自增主键
Trait Implementations§
Source§impl Clone for ColumnOptions
impl Clone for ColumnOptions
Source§fn clone(&self) -> ColumnOptions
fn clone(&self) -> ColumnOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColumnOptions
impl Debug for ColumnOptions
Auto Trait Implementations§
impl Freeze for ColumnOptions
impl RefUnwindSafe for ColumnOptions
impl Send for ColumnOptions
impl Sync for ColumnOptions
impl Unpin for ColumnOptions
impl UnsafeUnpin for ColumnOptions
impl UnwindSafe for ColumnOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more