Struct lumus_sql_builder::sqlite::Column
source · pub struct Column { /* private fields */ }
Expand description
Represents a table column with a name, data type, and options.
Implementations§
source§impl Column
impl Column
sourcepub fn new(name: &str) -> Column
pub fn new(name: &str) -> Column
Creates a new Column
instance with the given column name.
§Example
use lumus_sql_builder::sqlite::Column;
Column::new("name").text().not_null();
sourcepub fn auto_increment(self) -> Self
pub fn auto_increment(self) -> Self
Specifies that the column values should auto-increment.
sourcepub fn primary_key(self) -> Self
pub fn primary_key(self) -> Self
Specifies that the column is a primary key.
sourcepub fn build(&self) -> Result<String, SqlBuilderError>
pub fn build(&self) -> Result<String, SqlBuilderError>
Builds and returns the SQL representation of the column.
Trait Implementations§
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