Struct tiberius::ExecuteResult
source · [−]pub struct ExecuteResult { /* private fields */ }
Expand description
A result from a query execution, listing the number of affected rows.
If executing multiple queries, the resulting counts will be come separately, marking the rows affected for each query.
Example
let result = client
.execute(
"INSERT INTO #Test (id) VALUES (@P1); INSERT INTO #Test (id) VALUES (@P2, @P3)",
&[&1i32, &2i32, &3i32],
)
.await?;
assert_eq!(&[1, 2], result.rows_affected());
Implementations
sourceimpl<'a> ExecuteResult
impl<'a> ExecuteResult
sourcepub fn rows_affected(&self) -> &[u64]
pub fn rows_affected(&self) -> &[u64]
A slice of numbers of rows affected in the same order as the given queries.
Trait Implementations
sourceimpl Debug for ExecuteResult
impl Debug for ExecuteResult
Auto Trait Implementations
impl RefUnwindSafe for ExecuteResult
impl Send for ExecuteResult
impl Sync for ExecuteResult
impl Unpin for ExecuteResult
impl UnwindSafe for ExecuteResult
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more