|
lintel 0.2.0
|
#include <Result.h>
Public Member Functions | |
| Result (PGresult *res) | |
| ~Result () | |
| bool | isState (ExecStatusType status) const |
| std::string | getValue (int row, int attribute) const |
| int | getNumOfAttributes () const |
| int | getSize () const |
| db::Arguments & | of (std::size_t pos) |
Wraps a PostgreSQL PGresult and provides row/column access.
|
explicit |
Constructs a Result from a PGresult pointer, taking ownership.
| res | the PGresult pointer |
| lintel::postgresql::Result::~Result | ( | ) |
Destructor, frees the PGresult.
| int lintel::postgresql::Result::getNumOfAttributes | ( | ) | const |
| int lintel::postgresql::Result::getSize | ( | ) | const |
Retrieves a value at the given row and column.
| row | the row index |
| attribute | the column index |
| bool lintel::postgresql::Result::isState | ( | ExecStatusType | status | ) | const |
Checks whether the result has the given execution status.
| status | the expected ExecStatusType |
| db::Arguments & lintel::postgresql::Result::of | ( | std::size_t | pos | ) |
Accesses a row's arguments (mutable).
| pos | the row index |