summaryrefslogtreecommitdiff
path: root/libpqpp/pq-selectbase.h
diff options
context:
space:
mode:
authorDan Goodliffe <daniel.goodliffe@pressassociation.com>2017-01-03 15:03:05 +0000
committerDan Goodliffe <daniel.goodliffe@pressassociation.com>2017-01-03 15:16:54 +0000
commit40772ae759fe26acc69bebefa0eda173dbd981e4 (patch)
tree7afa52df382f8e8ee091dbb7acafee175403c9fb /libpqpp/pq-selectbase.h
parentOnly set unlogged for mocked tables on server versions 9.5 and above (diff)
downloadlibdbpp-postgresql-40772ae759fe26acc69bebefa0eda173dbd981e4.tar.bz2
libdbpp-postgresql-40772ae759fe26acc69bebefa0eda173dbd981e4.tar.xz
libdbpp-postgresql-40772ae759fe26acc69bebefa0eda173dbd981e4.zip
Refactor to remove some duplication
Diffstat (limited to 'libpqpp/pq-selectbase.h')
-rw-r--r--libpqpp/pq-selectbase.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/libpqpp/pq-selectbase.h b/libpqpp/pq-selectbase.h
index 217a9e7..a6b199a 100644
--- a/libpqpp/pq-selectbase.h
+++ b/libpqpp/pq-selectbase.h
@@ -2,14 +2,17 @@
#define PQ_SELECTBASE_H
#include <libpq-fe.h>
+#include <selectcommand.h>
namespace PQ {
- class SelectBase {
+ class SelectBase : public DB::SelectCommand {
friend class Column;
protected:
- SelectBase();
- ~SelectBase() = default;
+ SelectBase(const std::string & sql);
+ ~SelectBase();
+
+ void createColumns(PGresult *);
int nTuples, tuple;
PGresult * execRes;