pub struct Query<'q, DB = Any, Args = AnyArguments<'q>> {
pub sql: &'q str,
pub arguments: Vec<Value>,
pub _marker: PhantomData<(DB, Args)>,
}Fields§
§sql: &'q str§arguments: Vec<Value>§_marker: PhantomData<(DB, Args)>Implementations§
Source§impl<'q, DB: Database, Args> Query<'q, DB, Args>
impl<'q, DB: Database, Args> Query<'q, DB, Args>
pub fn bind<T>(self, value: T) -> Selfwhere
T: IntoBindValue,
pub async fn execute<E>(self, executor: E) -> Result<AnyQueryResult, Error>where
E: Executor<Database = DB>,
pub async fn fetch_all<E>(self, executor: E) -> Result<Vec<AnyRow>, Error>where
E: Executor<Database = DB>,
pub async fn fetch_optional<E>(
self,
executor: E,
) -> Result<Option<AnyRow>, Error>where
E: Executor<Database = DB>,
pub async fn fetch_one<E>(self, executor: E) -> Result<AnyRow, Error>where
E: Executor<Database = DB>,
Auto Trait Implementations§
impl<'q, DB, Args> Freeze for Query<'q, DB, Args>
impl<'q, DB, Args> RefUnwindSafe for Query<'q, DB, Args>where
DB: RefUnwindSafe,
Args: RefUnwindSafe,
impl<'q, DB, Args> Send for Query<'q, DB, Args>
impl<'q, DB, Args> Sync for Query<'q, DB, Args>
impl<'q, DB, Args> Unpin for Query<'q, DB, Args>
impl<'q, DB, Args> UnsafeUnpin for Query<'q, DB, Args>
impl<'q, DB, Args> UnwindSafe for Query<'q, DB, Args>where
DB: UnwindSafe,
Args: UnwindSafe,
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