|
libdballe
7.7
|
Wrap a PGresult, taking care of its memory management. More...
#include <internals.h>
Public Member Functions | |
| Result (PGresult *res) | |
| Result (Result &&o) | |
| Implement move. | |
| Result & | operator= (Result &&o) |
| operator bool () const | |
| operator PGresult * () | |
| operator const PGresult * () const | |
| void | expect_no_data (const std::string &query) |
| Check that the result successfully returned no data. | |
| void | expect_result (const std::string &query) |
| Check that the result successfully returned some (possibly empty) data. | |
| void | expect_one_row (const std::string &query) |
| Check that the result successfully returned one row of data. | |
| void | expect_success (const std::string &query) |
| Check that the result was successful. | |
| unsigned | rowcount () const |
| Get the number of rows in the result. | |
| bool | is_null (unsigned row, unsigned col) const |
| Check if a result value is null. | |
| bool | get_bool (unsigned row, unsigned col) const |
| Return a result value, transmitted in binary as a byte (?) | |
| uint16_t | get_int2 (unsigned row, unsigned col) const |
| Return a result value, transmitted in binary as a 2 bit integer. | |
| uint32_t | get_int4 (unsigned row, unsigned col) const |
| Return a result value, transmitted in binary as a 4 bit integer. | |
| uint64_t | get_int8 (unsigned row, unsigned col) const |
| Return a result value, transmitted in binary as an 8 bit integer. | |
| const char * | get_string (unsigned row, unsigned col) const |
| Return a result value, transmitted as a string. | |
| Datetime | get_timestamp (unsigned row, unsigned col) const |
| Return a result value, transmitted as a timestamp without timezone. | |
| Result (const Result &)=delete | |
| Result & | operator= (const Result &)=delete |
Data Fields | |
| PGresult * | res |
Wrap a PGresult, taking care of its memory management.
1.8.9.1