pub struct CommandResult { /* private fields */ }Expand description
A materialized result from executing a Command, carrying the number of
affected rows, the return code, the values of any OUT parameters and any
record sets returned by the command.
§Example
let mut cmd = Command::new("dbo.usp_SomeStoredProc");
cmd.bind_param("@foo", 34i32);
cmd.bind_out_param("@bar", "bar");
let res = cmd.exec(&mut client).await?.into_command_result().await?;
let rv: Option<&str> = res.try_return_value("@bar")?;
let rc = res.return_code();
let ra = res.rows_affected();
let rs0 = res.to_query_result(0);Implementations§
Source§impl<'a> CommandResult
impl<'a> CommandResult
Sourcepub fn rows_affected(&self) -> &[u64]
pub fn rows_affected(&self) -> &[u64]
A slice of the numbers of rows affected, in the same order as the statements ran by the command.
Sourcepub fn return_code(&self) -> u32
pub fn return_code(&self) -> u32
The return code of the command, as returned by the server.
Sourcepub fn return_values_len(&self) -> usize
pub fn return_values_len(&self) -> usize
The number of returned values (OUT parameters) available.
Trait Implementations§
Source§impl Debug for CommandResult
impl Debug for CommandResult
Source§impl IntoIterator for CommandResult
impl IntoIterator for CommandResult
Auto Trait Implementations§
impl Freeze for CommandResult
impl RefUnwindSafe for CommandResult
impl Send for CommandResult
impl Sync for CommandResult
impl Unpin for CommandResult
impl UnsafeUnpin for CommandResult
impl UnwindSafe for CommandResult
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