diff options
Diffstat (limited to 'src/database/database-postgresql.h')
-rw-r--r-- | src/database/database-postgresql.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/database/database-postgresql.h b/src/database/database-postgresql.h index 22269d362..278379f5d 100644 --- a/src/database/database-postgresql.h +++ b/src/database/database-postgresql.h @@ -65,6 +65,11 @@ protected: ); } + inline std::string pg_to_string(PGresult *res, int row, int col) + { + return std::string(PQgetvalue(res, row, col), PQgetlength(res, row, col)); + } + inline PGresult *execPrepared(const char *stmtName, const int paramsNumber, const void **params, const int *paramsLengths = NULL, const int *paramsFormats = NULL, |