pub struct QueryBuilder { /* private fields */ }Implementations§
Source§impl QueryBuilder
impl QueryBuilder
pub fn new(query: &str) -> Self
pub fn set_sql(self, sql: &str) -> Self
pub fn bind<T: Serialize>(self, value: T) -> Self
pub fn build(self) -> Query
pub async fn execute(self, connection: &Client) -> Result<()>
pub async fn execute_raw( self, connection: &Client, is_select: bool, ) -> Result<QueryResponse>
pub async fn fetch_one<T>(self, conn: &Client) -> Result<Option<T>>where
T: DeserializeOwned,
pub async fn fetch_all<T>(self, conn: &Client) -> Result<Vec<T>>where
T: DeserializeOwned,
Trait Implementations§
Source§impl From<QueryBuilder> for Query
impl From<QueryBuilder> for Query
Source§fn from(value: QueryBuilder) -> Self
fn from(value: QueryBuilder) -> Self
Converts to this type from the input type.
Auto 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