pub enum Query<D: Driver> {
Raw(String),
Prepared(D::Prepared),
}Expand description
Executable query: raw SQL or prepared statement.
Variants§
Implementations§
Source§impl<D: Driver> Query<D>
impl<D: Driver> Query<D>
pub fn is_prepared(&self) -> bool
Sourcepub fn clear_bindings(&mut self) -> Result<&mut Self>
pub fn clear_bindings(&mut self) -> Result<&mut Self>
Clear all bound values.
Sourcepub fn bind(&mut self, value: impl AsValue) -> Result<&mut Self>
pub fn bind(&mut self, value: impl AsValue) -> Result<&mut Self>
Append a bound value. It results in a error if the query is not prepared.
Sourcepub fn bind_index(
&mut self,
value: impl AsValue,
index: u64,
) -> Result<&mut Self>
pub fn bind_index( &mut self, value: impl AsValue, index: u64, ) -> Result<&mut Self>
Bind a value at a specific index. It results in a error if the query is not prepared.
Trait Implementations§
Auto Trait Implementations§
impl<D> Freeze for Query<D>
impl<D> RefUnwindSafe for Query<D>
impl<D> Send for Query<D>
impl<D> Sync for Query<D>
impl<D> Unpin for Query<D>
impl<D> UnwindSafe for Query<D>
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