pub struct CandidColumnDef {
pub table: Option<String>,
pub name: String,
pub data_type: CandidDataTypeKind,
pub nullable: bool,
pub primary_key: bool,
pub foreign_key: Option<CandidForeignKeyDef>,
}Expand description
Serializable column definition for API boundaries.
This type mirrors ColumnDef but uses owned String fields instead
of &'static str, making it suitable for serialization across API boundaries.
Fields§
§table: Option<String>The source table name. Some for join results, None for single-table queries.
name: StringThe name of the column.
data_type: CandidDataTypeKindThe data type of the column.
nullable: boolIndicates if this column can contain NULL values.
primary_key: boolIndicates if this column is part of the primary key.
foreign_key: Option<CandidForeignKeyDef>Foreign key definition, if any.
Trait Implementations§
Source§impl Clone for CandidColumnDef
impl Clone for CandidColumnDef
Source§fn clone(&self) -> CandidColumnDef
fn clone(&self) -> CandidColumnDef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CandidColumnDef
impl Debug for CandidColumnDef
Source§impl<'de> Deserialize<'de> for CandidColumnDef
impl<'de> Deserialize<'de> for CandidColumnDef
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 From<ColumnDef> for CandidColumnDef
impl From<ColumnDef> for CandidColumnDef
Source§impl PartialEq for CandidColumnDef
impl PartialEq for CandidColumnDef
Source§impl Serialize for CandidColumnDef
impl Serialize for CandidColumnDef
impl Eq for CandidColumnDef
impl StructuralPartialEq for CandidColumnDef
Auto Trait Implementations§
impl Freeze for CandidColumnDef
impl RefUnwindSafe for CandidColumnDef
impl Send for CandidColumnDef
impl Sync for CandidColumnDef
impl Unpin for CandidColumnDef
impl UnsafeUnpin for CandidColumnDef
impl UnwindSafe for CandidColumnDef
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