pub enum CommandItem {
Row(Row),
Metadata(ResultMetadata),
ReturnStatus(i32),
ReturnValue(CommandReturnValue),
RowsAffected(u64),
}Expand description
An item produced by a CommandStream.
Variants§
Row(Row)
A single row of data.
Metadata(ResultMetadata)
Metadata describing the upcoming rows.
ReturnStatus(i32)
The procedure’s RETURN value. Signed: RETURN -1 is -1.
ReturnValue(CommandReturnValue)
A return value, matching an OUT parameter.
RowsAffected(u64)
The number of rows an INSERT, UPDATE, DELETE or other non-SELECT
statement affected. SELECTs and variable assignments produce none, as
with SqlClient’s ExecuteNonQuery; see ExecuteResult::rows_affected.
Implementations§
Source§impl CommandItem
impl CommandItem
Sourcepub fn as_metadata(&self) -> Option<&ResultMetadata>
pub fn as_metadata(&self) -> Option<&ResultMetadata>
Returns a reference to the metadata, if the item is of a correct variant.
Sourcepub fn as_row(&self) -> Option<&Row>
pub fn as_row(&self) -> Option<&Row>
Returns a reference to the row, if the item is of a correct variant.
Sourcepub fn into_metadata(self) -> Option<ResultMetadata>
pub fn into_metadata(self) -> Option<ResultMetadata>
Returns the metadata, if the item is of a correct variant.
Sourcepub fn as_return_status(&self) -> Option<i32>
pub fn as_return_status(&self) -> Option<i32>
Returns the return status, if the item is of a correct variant.
Sourcepub fn as_return_value(&self) -> Option<&CommandReturnValue>
pub fn as_return_value(&self) -> Option<&CommandReturnValue>
Returns a reference to the return value, if the item is of a correct variant.
Sourcepub fn into_return_value(self) -> Option<CommandReturnValue>
pub fn into_return_value(self) -> Option<CommandReturnValue>
Returns the return value, if the item is of a correct variant.