Struct hdbconnect::HdbResponse [−][src]
pub struct HdbResponse { /* fields omitted */ }
Represents all possible non-error responses to a database command.
Technically, it is a list of single database response values, each of which can be
- a resultset of a query
- a list of numbers of affected rows
- values of output parameters of a procedure call
- just an indication that a db call was successful
- a list of
XaTransactionId
s
Typically, i.e. in all simple cases, you just have a single database
response value, and can use the respective into_
message to convert the
HdbResponse directly into this single value, whose type is predetermined by
the nature of the database call.
Procedure calls e.g. belong to the more complex cases where the database
response can consist of e.g. multiple result sets. In this case, you need
to evaluate the HdbResponse using the get_
methods.
Methods
impl HdbResponse
[src]
impl HdbResponse
pub fn count(&self) -> usize
[src]
pub fn count(&self) -> usize
Returns the number of contained single return values.
pub fn into_resultset(self) -> HdbResult<ResultSet>
[src]
pub fn into_resultset(self) -> HdbResult<ResultSet>
Turns itself into a single resultset.
If this cannot be done without loss of information, an error is returned.
pub fn into_affected_rows(self) -> HdbResult<Vec<usize>>
[src]
pub fn into_affected_rows(self) -> HdbResult<Vec<usize>>
Turns itself into a Vector of numbers (each number representing a number of affected rows).
If this cannot be done without loss of information, an error is returned.
pub fn into_output_parameters(self) -> HdbResult<OutputParameters>
[src]
pub fn into_output_parameters(self) -> HdbResult<OutputParameters>
Turns itself into a Vector of numbers (each number representing a number of affected rows).
If this cannot be done without loss of information, an error is returned.
pub fn into_success(self) -> HdbResult<()>
[src]
pub fn into_success(self) -> HdbResult<()>
Turns itself into (), if the statement had returned successfully.
If this cannot be done without loss of information, an error is returned.
pub fn into_single_retval(self) -> HdbResult<HdbReturnValue>
[src]
pub fn into_single_retval(self) -> HdbResult<HdbReturnValue>
Turns itself into a single return value, if there is exactly one.
pub fn get_success(&mut self) -> HdbResult<()>
[src]
pub fn get_success(&mut self) -> HdbResult<()>
Returns () if a successful execution was signaled by the database explicitly, or an error otherwise.
pub fn get_resultset(&mut self) -> HdbResult<ResultSet>
[src]
pub fn get_resultset(&mut self) -> HdbResult<ResultSet>
Returns the next ResultSet
, or an error if there is none.
pub fn get_parameter_descriptor(&mut self) -> HdbResult<ParameterDescriptor>
[src]
pub fn get_parameter_descriptor(&mut self) -> HdbResult<ParameterDescriptor>
Returns the next ParameterDescriptor
, or an error if there is none.
pub fn get_affected_rows(&mut self) -> HdbResult<Vec<usize>>
[src]
pub fn get_affected_rows(&mut self) -> HdbResult<Vec<usize>>
Returns the next set of affected rows counters, or an error if there is none.
pub fn get_output_parameters(&mut self) -> HdbResult<OutputParameters>
[src]
pub fn get_output_parameters(&mut self) -> HdbResult<OutputParameters>
Returns the next OutputParameters
, or an error if there is none.
Trait Implementations
impl Debug for HdbResponse
[src]
impl Debug for HdbResponse
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Display for HdbResponse
[src]
impl Display for HdbResponse
Auto Trait Implementations
impl Send for HdbResponse
impl Send for HdbResponse
impl !Sync for HdbResponse
impl !Sync for HdbResponse