pub struct Column {
pub id: ColumnId,
pub name: String,
pub data_type: DataType,
pub character_set: Option<String>,
pub collation: Option<String>,
pub nullable: bool,
pub primary_key: bool,
pub auto_increment: bool,
pub default_value: Option<Value>,
}Fields§
§id: ColumnId§name: String§data_type: DataType§character_set: Option<String>§collation: Option<String>§nullable: bool§primary_key: bool§auto_increment: bool§default_value: Option<Value>Implementations§
Source§impl Column
impl Column
pub fn new(id: ColumnId, name: String, data_type: DataType) -> Self
pub fn nullable(self, nullable: bool) -> Self
pub fn primary_key(self, primary_key: bool) -> Self
pub fn auto_increment(self, auto_increment: bool) -> Self
pub fn default_value(self, value: Value) -> Self
pub fn character_set(self, character_set: Option<String>) -> Self
pub fn collation(self, collation: Option<String>) -> Self
pub fn validate_value(&self, value: &Value) -> bool
pub fn get_default_or_null(&self) -> Value
pub fn size(&self) -> usize
pub fn serialize(&self, buffer: &mut Vec<u8>) -> Result<(), HematiteError>
pub fn deserialize( buffer: &[u8], offset: &mut usize, ) -> Result<Self, HematiteError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Column
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnsafeUnpin for Column
impl UnwindSafe for Column
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