Enum hdbconnect::HdbReturnValue
source · pub enum HdbReturnValue {
ResultSet(ResultSet),
AffectedRows(Vec<usize>),
OutputParameters(OutputParameters),
Success,
XaTransactionIds(Vec<XaTransactionId>),
}
Expand description
An enum that describes a single database return value.
Variants§
ResultSet(ResultSet)
A resultset of a query.
AffectedRows(Vec<usize>)
A list of numbers of affected rows.
OutputParameters(OutputParameters)
Values of output parameters of a procedure call.
Success
Indication that a db call was successful.
XaTransactionIds(Vec<XaTransactionId>)
A list of XaTransactionId
s.
Implementations§
source§impl HdbReturnValue
impl HdbReturnValue
sourcepub fn into_resultset(self) -> Result<ResultSet, HdbError>
pub fn into_resultset(self) -> Result<ResultSet, HdbError>
Turns itself into a single resultset.
§Errors
HdbError::Evaluation
for other variants than HdbReturnValue::ResultSet
.
sourcepub fn into_affected_rows(self) -> Result<Vec<usize>, HdbError>
pub fn into_affected_rows(self) -> Result<Vec<usize>, HdbError>
Turns itself into a Vector of numbers (each number representing a number of affected rows).
§Errors
HdbError::Evaluation
for other variants than HdbReturnValue::AffectedRows
.
sourcepub fn into_output_parameters(self) -> Result<OutputParameters, HdbError>
pub fn into_output_parameters(self) -> Result<OutputParameters, HdbError>
Turns itself into a Vector of numbers (each number representing a number of affected rows).
§Errors
HdbError::Evaluation
for other variants than HdbReturnValue::OutputParameters
.
sourcepub fn into_success(self) -> Result<(), HdbError>
pub fn into_success(self) -> Result<(), HdbError>
Turns itself into (), if the statement had returned successfully.
§Errors
HdbError::Evaluation
for other variants of HdbReturnValue
.
sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Returns true if the statement had returned successfully.