33 return ptr.get() == NULL;
42 return PQntuples(
ptr.get());
54 std::vector<std::string> result;
57 PGresult* r =
ptr.get();
60 for (
int j = 0; j < PQnfields(r); j++) {
61 result.push_back(std::string(PQgetvalue(r, i, j)));
PGresult deleter (for shared pointer)
bool isFailed() const
Check if the query failed.
unptr::unique_ptr< PGresult, PGresultDeleter > ptr
Unique pointer to the actual PGresult.
std::vector< std::string > getRow(int i) const
QueryResult(PGresult *ptr)
fo namespace holds the FOSSology library functions.