[−][src]Struct debil::QueryBuilder
Methods
impl QueryBuilder
[src]
pub fn new() -> QueryBuilder
[src]
pub fn table(self, table_name: impl Into<String>) -> QueryBuilder
[src]
pub fn selects(self, selects: Vec<impl Into<String>>) -> QueryBuilder
[src]
pub fn append_selects(self, selects: Vec<impl Into<String>>) -> QueryBuilder
[src]
pub fn wheres<S: Into<String>>(self, cond: Vec<S>) -> QueryBuilder
[src]
pub fn filter(self, cond: impl Into<String>) -> QueryBuilder
[src]
pub fn limit(self, n: i32) -> QueryBuilder
[src]
pub fn inner_join(
self,
target_table: impl Into<String>,
on_fields: (impl Into<String>, impl Into<String>)
) -> QueryBuilder
[src]
self,
target_table: impl Into<String>,
on_fields: (impl Into<String>, impl Into<String>)
) -> QueryBuilder
pub fn left_join(
self,
target_table: impl Into<String>,
on_fields: (impl Into<String>, impl Into<String>)
) -> QueryBuilder
[src]
self,
target_table: impl Into<String>,
on_fields: (impl Into<String>, impl Into<String>)
) -> QueryBuilder
pub fn right_join(
self,
target_table: impl Into<String>,
on_fields: (impl Into<String>, impl Into<String>)
) -> QueryBuilder
[src]
self,
target_table: impl Into<String>,
on_fields: (impl Into<String>, impl Into<String>)
) -> QueryBuilder
pub fn group_by<S: Into<String>>(self, fields: Vec<S>) -> QueryBuilder
[src]
pub fn build(self) -> String
[src]
pub async fn load<'_, R: QueryExecutor<T, E>, T, E>(
self,
executor: &'_ R
) -> Result<Vec<T>, E>
[src]
self,
executor: &'_ R
) -> Result<Vec<T>, E>
pub async fn first<'_, R: QueryExecutor<T, E>, T, E>(
self,
executor: &'_ R
) -> Result<T, E>
[src]
self,
executor: &'_ R
) -> Result<T, E>
pub async fn save<'_, R: QueryExecutor<T, E>, T, E>(
self,
executor: &'_ R,
data: T
) -> Result<(), E>
[src]
self,
executor: &'_ R,
data: T
) -> Result<(), E>
pub async fn save_all<'_, R: QueryExecutor<T, E>, T, E>(
self,
executor: &'_ R,
data: Vec<T>
) -> Result<(), E>
[src]
self,
executor: &'_ R,
data: Vec<T>
) -> Result<(), E>
Trait Implementations
impl Clone for QueryBuilder
[src]
fn clone(&self) -> QueryBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for QueryBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for QueryBuilder
impl Send for QueryBuilder
impl Sync for QueryBuilder
impl Unpin for QueryBuilder
impl UnwindSafe for QueryBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,