pub struct TableBuilder {
pub query: String,
pub name: String,
pub schema: String,
pub all: Vec<String>,
}
Expand description
Struct that benefits you to create Tables. Currently incomplete thoug.
Fields§
§query: String
§name: String
§schema: String
§all: Vec<String>
Implementations§
Source§impl TableBuilder
implementations for TableBuilder
impl TableBuilder
implementations for TableBuilder
pub fn create(schema_name: &str, table_name: &str) -> Self
pub fn if_not_exists(&mut self) -> &mut Self
pub fn add_column(&mut self, column_name: &str) -> &mut Self
pub fn col_type(&mut self, type_name: &str) -> &mut Self
pub fn null(&mut self) -> &mut Self
pub fn not_null(&mut self) -> &mut Self
pub fn auto_increment(&mut self) -> &mut Self
pub fn primary_key(&mut self) -> &mut Self
pub fn default(&mut self, value: ValueType) -> &mut Self
pub fn unique(&mut self) -> &mut Self
pub fn check(&mut self, condition: &str) -> &mut Self
pub fn character_set(&mut self, character_set: &str) -> &mut Self
pub fn foreign_key(&mut self, opts: ForeignKey) -> &mut Self
pub fn unsigned(&mut self) -> &mut Self
pub fn zerofill(&mut self) -> &mut Self
pub fn enum_sql(&mut self, enum_vec: Vec<&str>) -> &mut Self
pub fn generated_always(&mut self, condition: &str) -> &mut Self
pub fn virtual_sql(&mut self) -> &mut Self
pub fn stored(&mut self) -> &mut Self
pub fn spatial(&mut self) -> &mut Self
pub fn generated(&mut self) -> &mut Self
pub fn index(&mut self, indexes: Vec<&str>) -> &mut Self
pub fn comment(&mut self, comment: &str) -> &mut Self
pub fn default_on_null(&mut self, value: ValueType) -> &mut Self
pub fn invisible(&mut self) -> &mut Self
pub fn custom_query(&mut self, query: &str) -> &mut Self
pub fn finish(&mut self) -> String
Trait Implementations§
Source§impl Clone for TableBuilder
impl Clone for TableBuilder
Source§fn clone(&self) -> TableBuilder
fn clone(&self) -> TableBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for TableBuilder
impl RefUnwindSafe for TableBuilder
impl Send for TableBuilder
impl Sync for TableBuilder
impl Unpin for TableBuilder
impl UnwindSafe for TableBuilder
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