pub struct ColumnRef {
pub table: &'static str,
pub name: &'static str,
pub sql_type: &'static str,
pub flags: ColumnFlags,
pub dialect: ColumnDialect,
}Expand description
Column reference with full schema metadata.
Carries both the SQL rendering fields (table, name) and
complete column metadata. SQL rendering code only uses the name fields
and ignores extra metadata.
Fields§
§table: &'static str§name: &'static str§sql_type: &'static str§flags: ColumnFlags§dialect: ColumnDialectImplementations§
Source§impl ColumnRef
impl ColumnRef
Sourcepub const fn sql(table: &'static str, name: &'static str) -> Self
pub const fn sql(table: &'static str, name: &'static str) -> Self
Creates a lightweight ColumnRef for SQL rendering only.
Only table and name are populated; metadata fields
use empty defaults. Use a full struct literal for metadata-carrying refs.
Sourcepub const fn primary_key(&self) -> bool
pub const fn primary_key(&self) -> bool
Returns true if this column participates in the primary key.
Sourcepub const fn has_default(&self) -> bool
pub const fn has_default(&self) -> bool
Returns true if this column has a DEFAULT clause.
Trait Implementations§
impl Copy for ColumnRef
impl Eq for ColumnRef
Source§impl From<&ColumnRef> for ColumnSqlRef
impl From<&ColumnRef> for ColumnSqlRef
Source§impl From<ColumnRef> for ColumnSqlRef
impl From<ColumnRef> for ColumnSqlRef
impl StructuralPartialEq for ColumnRef
Auto Trait Implementations§
impl Freeze for ColumnRef
impl RefUnwindSafe for ColumnRef
impl Send for ColumnRef
impl Sync for ColumnRef
impl Unpin for ColumnRef
impl UnsafeUnpin for ColumnRef
impl UnwindSafe for ColumnRef
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