pub struct ColumnDef { /* private fields */ }Implementations§
Source§impl ColumnDef
impl ColumnDef
pub fn new(name: impl Into<String>, kind: FieldKind) -> Self
pub fn nullable(self, nullable: bool) -> Self
pub fn primary_key(self, primary_key: bool) -> Self
pub fn default(self, default: ColumnDefault) -> Self
pub fn with_server_default(self, server_default: impl Into<String>) -> Self
pub fn with_identity(self, identity: IdentityDef) -> Self
pub fn with_computed(self, computed: ComputedDef) -> Self
pub fn autoincrement(self, autoincrement: bool) -> Self
pub fn with_collation(self, collation: impl Into<String>) -> Self
pub fn with_comment(self, comment: impl Into<String>) -> Self
pub fn with_max_length(self, max_length: u32) -> Self
pub fn numeric(self, precision: u32, scale: u32) -> Self
pub fn with_sqlite_on_conflict_primary_key( self, policy: impl Into<String>, ) -> Self
pub fn with_sqlite_on_conflict_primary_key_option( self, policy: Option<String>, ) -> Self
pub fn with_sqlite_on_conflict_not_null(self, policy: impl Into<String>) -> Self
pub fn with_sqlite_on_conflict_not_null_option( self, policy: Option<String>, ) -> Self
pub fn with_sqlite_on_conflict_unique(self, policy: impl Into<String>) -> Self
pub fn with_sqlite_on_conflict_unique_option( self, policy: Option<String>, ) -> Self
pub fn name(&self) -> &str
pub fn kind(&self) -> &FieldKind
pub fn is_nullable(&self) -> bool
pub fn is_primary_key(&self) -> bool
pub fn default_value(&self) -> Option<&ColumnDefault>
pub fn server_default(&self) -> Option<&str>
pub fn identity(&self) -> Option<&IdentityDef>
pub fn computed(&self) -> Option<&ComputedDef>
pub fn is_autoincrement(&self) -> bool
pub fn collation(&self) -> Option<&str>
pub fn comment(&self) -> Option<&str>
pub fn definition_eq_ignoring_comment(&self, other: &Self) -> bool
pub fn precision(&self) -> Option<u32>
pub fn max_length(&self) -> Option<u32>
pub fn scale(&self) -> Option<u32>
pub fn sqlite_on_conflict_primary_key(&self) -> Option<&str>
pub fn sqlite_on_conflict_not_null(&self) -> Option<&str>
pub fn sqlite_on_conflict_unique(&self) -> Option<&str>
Trait Implementations§
impl Eq for ColumnDef
impl StructuralPartialEq for ColumnDef
Auto Trait Implementations§
impl Freeze for ColumnDef
impl RefUnwindSafe for ColumnDef
impl Send for ColumnDef
impl Sync for ColumnDef
impl Unpin for ColumnDef
impl UnsafeUnpin for ColumnDef
impl UnwindSafe for ColumnDef
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