Struct geekorm_core::builder::columns::Column
source · pub struct Column {
pub name: String,
pub column_type: ColumnType,
pub alias: String,
pub skip: bool,
}
Expand description
A column in a table
Fields§
§name: String
Name of the column
column_type: ColumnType
Type of the column (e.g. TEXT, INTEGER, etc)
alias: String
Alias for the column
skip: bool
Metadata for the column
Implementations§
source§impl Column
impl Column
sourcepub fn new(name: String, column_type: ColumnType) -> Self
pub fn new(name: String, column_type: ColumnType) -> Self
Create a new instance of Column
sourcepub fn is_primary_key(&self) -> bool
pub fn is_primary_key(&self) -> bool
Check if the column is a primary key
Trait Implementations§
source§impl<'de> Deserialize<'de> for Column
impl<'de> Deserialize<'de> for Column
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 ToSqlite for Column
impl ToSqlite for Column
source§fn on_create(&self, query: &QueryBuilder) -> Result<String, Error>
fn on_create(&self, query: &QueryBuilder) -> Result<String, Error>
Convert to SQLite for creating a table
source§fn on_select(&self, query: &QueryBuilder) -> Result<String, Error>
fn on_select(&self, query: &QueryBuilder) -> Result<String, Error>
Convert to SQLite for selecting a row
Auto Trait Implementations§
impl Freeze for Column
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)