Hyper API for C++ 0.0.20746
Hyper client library for C++ applications
|
Base class for a result of a query. More...
#include <Result.hpp>
Public Member Functions | |
Result () | |
Constructs an empty Result object. | |
Result (Result &&other) noexcept | |
Move constructor. | |
Result & | operator= (Result &&other) noexcept |
Move assignment operator. | |
Result & | operator= (const Result &other)=delete |
Copy is forbidden. | |
Result (const Result &other)=delete | |
const ResultSchema & | getSchema () const noexcept |
Returns schema of the result. | |
optional< size_t > | getAffectedRowCount () const |
Get the affected row count, if the statement had any. | |
Connection & | getConnection () |
Returns the connection of the SQL statement that yielded this result. | |
bool | isOpen () const noexcept |
Checks whether the result is open. | |
void | close () noexcept |
Closes the result. | |
Base class for a result of a query.
Note: While this resource is open, the connection is busy.
Definition at line 326 of file Result.hpp.
|
inline |
Constructs an empty Result
object.
std::bad_alloc | in case of error |
Definition at line 333 of file Result.hpp.
|
noexcept |
Closes the result.
Makes the connection usable again.
optional< size_t > hyperapi::Result::getAffectedRowCount | ( | ) | const |
Get the affected row count, if the statement had any.
If this result also produced rows, then this method is only accessible after having read all rows.
HyperException | in case of error |
Connection & hyperapi::Result::getConnection | ( | ) |
Returns the connection of the SQL statement that yielded this result.
|
inlinenoexcept |
|
noexcept |
Checks whether the result is open.
The connection is unusable as long as a result is still open.