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,
}Expand description
Column definition parsed from a .qail schema file.
Fields§
§name: StringColumn name.
typ: StringSQL data type (lowercased).
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: boolWhether the column accepts NULL.
primary_key: boolWhether the column is a primary key.
unique: boolWhether the column has a UNIQUE constraint.
references: Option<String>Foreign key reference (e.g. “users(id)”).
default_value: Option<String>Default value expression.
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 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