pub enum DBImpl {
SQLite,
Postgres,
MySQL,
}Expand description
The main interface for creating sql strings
Variants
SQLite
Implementation of SQLite
Postgres
Implementation of Postgres
MySQL
Implementation of MySQL / MariaDB
Implementations
sourceimpl DBImpl
impl DBImpl
sourcepub fn create_table<'until_build, 'post_build>(
&self,
name: &'until_build str
) -> impl CreateTable<'until_build, 'post_build>where
'post_build: 'until_build,
pub fn create_table<'until_build, 'post_build>(
&self,
name: &'until_build str
) -> impl CreateTable<'until_build, 'post_build>where
'post_build: 'until_build,
sourcepub fn create_trigger(
&self,
name: &str,
table_name: &str,
point_in_time: Option<SQLCreateTriggerPointInTime>,
operation: SQLCreateTriggerOperation
) -> SQLCreateTrigger
pub fn create_trigger(
&self,
name: &str,
table_name: &str,
point_in_time: Option<SQLCreateTriggerPointInTime>,
operation: SQLCreateTriggerOperation
) -> SQLCreateTrigger
The entry point to create a trigger.
name: &str: Name of the trigger.
table_name: &str: Name of the table to create the trigger on.
point_in_time: Optionoperation: SQLCreateTriggerOperation: The operation that invokes the trigger.
sourcepub fn create_index<'until_build>(
&self,
name: &'until_build str,
table_name: &'until_build str
) -> impl CreateIndex<'until_build>
pub fn create_index<'until_build>(
&self,
name: &'until_build str,
table_name: &'until_build str
) -> impl CreateIndex<'until_build>
sourcepub fn drop_table<'until_build>(
&self,
name: &'until_build str
) -> impl DropTable + 'until_build
pub fn drop_table<'until_build>(
&self,
name: &'until_build str
) -> impl DropTable + 'until_build
The entry point to drop a table.
name: &str: Name of the table to drop.
sourcepub fn alter_table<'until_build, 'post_build>(
&self,
name: &'until_build str,
operation: AlterTableOperation<'until_build, 'post_build>
) -> impl AlterTable<'post_build> + 'until_buildwhere
'post_build: 'until_build,
pub fn alter_table<'until_build, 'post_build>(
&self,
name: &'until_build str,
operation: AlterTableOperation<'until_build, 'post_build>
) -> impl AlterTable<'post_build> + 'until_buildwhere
'post_build: 'until_build,
The entry point to alter a table.
name: &str: Name of the table to execute the operation on.
operation: [crate::alter_table::SQLAlterTableOperation]: The operation to execute.
sourcepub fn create_column<'until_build, 'post_build>(
&self,
table_name: &'until_build str,
name: &'until_build str,
data_type: DbType,
annotations: &'post_build [Annotation]
) -> CreateColumnImpl<'until_build, 'post_build>
pub fn create_column<'until_build, 'post_build>(
&self,
table_name: &'until_build str,
name: &'until_build str,
data_type: DbType,
annotations: &'post_build [Annotation]
) -> CreateColumnImpl<'until_build, 'post_build>
sourcepub fn select<'until_build, 'post_build>(
&self,
columns: &'until_build [&'until_build str],
from_clause: &'until_build str
) -> impl Select<'until_build, 'post_build>
pub fn select<'until_build, 'post_build>(
&self,
columns: &'until_build [&'until_build str],
from_clause: &'until_build str
) -> impl Select<'until_build, 'post_build>
Build a select query.
Parameter:
columns: The columns to select.from_clausespecifies from what to select. This can be a table name or another query itself.
sourcepub fn insert<'until_build, 'post_build>(
&self,
into_clause: &'until_build str,
insert_columns: &'until_build [&'until_build str],
insert_values: &'until_build [&'until_build [Value<'post_build>]]
) -> impl Insert<'post_build>where
'until_build: 'post_build,
pub fn insert<'until_build, 'post_build>(
&self,
into_clause: &'until_build str,
insert_columns: &'until_build [&'until_build str],
insert_values: &'until_build [&'until_build [Value<'post_build>]]
) -> impl Insert<'post_build>where
'until_build: 'post_build,
Build an INSERT query.
Parameter:
into_clause: The table to insert into.insert_columns: The column names to insert into.insert_values: The values to insert.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DBImpl
impl Send for DBImpl
impl Sync for DBImpl
impl Unpin for DBImpl
impl UnwindSafe for DBImpl
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more