[−][src]Struct hdbconnect::HdbResponse
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.
Fields
return_values: Vec<HdbReturnValue>
The return values: Result sets, output parameters, etc.
Methods
impl HdbResponse
[src]
pub fn count(&self) -> usize
[src]
Returns the number of return values.
pub fn into_resultset(self) -> HdbResult<ResultSet>
[src]
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]
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]
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]
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]
Turns itself into a single return value, if there is exactly one.
pub fn get_success(&mut self) -> HdbResult<()>
[src]
Returns () if a successful execution was signaled by the database explicitly, or an error otherwise.
pub fn get_resultset(&mut self) -> HdbResult<ResultSet>
[src]
Returns the next ResultSet
, or an error if there is none.
pub fn get_parameter_descriptor(&mut self) -> HdbResult<ParameterDescriptor>
[src]
Returns the next ParameterDescriptor
, or an error if there is none.
pub fn get_affected_rows(&mut self) -> HdbResult<Vec<usize>>
[src]
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]
Returns the next OutputParameters
, or an error if there is none.
Trait Implementations
impl Display for HdbResponse
[src]
impl Debug for HdbResponse
[src]
Auto Trait Implementations
impl !Send for HdbResponse
impl !Sync for HdbResponse
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Same for T
type Output = T
Should always be Self