pub struct ColumnDef {
pub name: String,
pub typ: String,
pub is_array: bool,
pub type_params: Option<Vec<String>>,
pub nullable: bool,
pub primary_key: bool,
pub unique: bool,
pub references: Option<String>,
pub default_value: Option<String>,
pub check: Option<String>,
pub is_serial: bool,
}Fields§
§name: String§typ: String§is_array: boolType is an array (e.g., text[], uuid[])
type_params: Option<Vec<String>>Type parameters (e.g., varchar(255) -> Some(vec![“255”]), decimal(10,2) -> Some(vec![“10”, “2”]))
nullable: bool§primary_key: bool§unique: bool§references: Option<String>§default_value: Option<String>§check: Option<String>Check constraint expression
is_serial: boolIs this a serial/auto-increment type
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ColumnDef
impl<'de> Deserialize<'de> for ColumnDef
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
Auto Trait Implementations§
impl Freeze for ColumnDef
impl RefUnwindSafe for ColumnDef
impl Send for ColumnDef
impl Sync for ColumnDef
impl Unpin 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