Struct butane_core::migrations::adb::AColumn
source · pub struct AColumn { /* private fields */ }
Expand description
Abstract representation of a database column schema.
Implementations§
source§impl AColumn
impl AColumn
pub fn new( name: impl Into<String>, sqltype: DeferredSqlType, nullable: bool, pk: bool, auto: bool, unique: bool, default: Option<SqlVal> ) -> Self
sourcepub fn new_simple(name: impl Into<String>, sqltype: DeferredSqlType) -> Self
pub fn new_simple(name: impl Into<String>, sqltype: DeferredSqlType) -> Self
Simple column that is non-null, non-auto, non-pk, non-unique with no default
pub fn name(&self) -> &str
pub fn nullable(&self) -> bool
pub fn unique(&self) -> bool
pub fn is_pk(&self) -> bool
pub fn default(&self) -> &Option<SqlVal>
pub fn typeid(&self) -> Result<TypeIdentifier>
pub fn is_auto(&self) -> bool
Trait Implementations§
source§impl<'de> Deserialize<'de> for AColumn
impl<'de> Deserialize<'de> for AColumn
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<AColumn> for AColumn
impl PartialEq<AColumn> for AColumn
impl StructuralPartialEq for AColumn
Auto Trait Implementations§
impl RefUnwindSafe for AColumn
impl Send for AColumn
impl Sync for AColumn
impl Unpin for AColumn
impl UnwindSafe for AColumn
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