pub struct QueryBuilder { /* private fields */ }
Expand description
Query builder for SELECT operations
Implementations§
Source§impl QueryBuilder
impl QueryBuilder
Sourcepub fn order(self, column: &str, direction: OrderDirection) -> Self
pub fn order(self, column: &str, direction: OrderDirection) -> Self
Add ordering
Sourcepub async fn execute<T>(&self) -> Result<Vec<T>>where
T: for<'de> Deserialize<'de>,
pub async fn execute<T>(&self) -> Result<Vec<T>>where
T: for<'de> Deserialize<'de>,
Execute the query
Sourcepub async fn single_execute<T>(&self) -> Result<Option<T>>where
T: for<'de> Deserialize<'de>,
pub async fn single_execute<T>(&self) -> Result<Option<T>>where
T: for<'de> Deserialize<'de>,
Execute the query and return a single row
Trait Implementations§
Source§impl Clone for QueryBuilder
impl Clone for QueryBuilder
Source§fn clone(&self) -> QueryBuilder
fn clone(&self) -> QueryBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for QueryBuilder
impl !RefUnwindSafe for QueryBuilder
impl Send for QueryBuilder
impl Sync for QueryBuilder
impl Unpin for QueryBuilder
impl !UnwindSafe for QueryBuilder
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