[−][src]Struct tiberius::ExecuteResult
A Stream
of counts of affected rows resulting from an INSERT
, UPDATE
or
DELETE
query. The ExecuteResult
needs to be polled empty before sending
another query to the Client
, failing to do so causes a flush before the
next query, slowing it down in an undeterministic way.
If executing multiple queries, the resulting counts will be come separately, marking the rows affected for each query.
let stream = conn .execute( "INSERT INTO #Test (id) VALUES (@P1); INSERT INTO #Test (id) VALUES (@P2, @P3)", &[&1i32, &2i32, &3i32], ) .await?; let result: Vec<u64> = stream.into_iter().collect(); assert_eq!(vec![1, 2], result);
Implementations
impl<'a> ExecuteResult
[src]
pub fn total(self) -> u64
[src]
Aggregates all resulting row counts into a sum.
let rows_affected = conn .execute( "INSERT INTO #Test (id) VALUES (@P1); INSERT INTO #Test (id) VALUES (@P2, @P3)", &[&1i32, &2i32, &3i32], ) .await?; assert_eq!(3, rows_affected.total());
Trait Implementations
impl Debug for ExecuteResult
[src]
impl IntoIterator for ExecuteResult
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,