diff options
author | Dan Goodliffe <daniel.goodliffe@pressassociation.com> | 2017-01-03 15:03:05 +0000 |
---|---|---|
committer | Dan Goodliffe <daniel.goodliffe@pressassociation.com> | 2017-01-03 15:16:54 +0000 |
commit | bac96d1b62dde949412a998cb0c3231ad179d870 (patch) | |
tree | ea7a72996c508d2c62104fe3ce523453b8f57d6b /libpqpp/pq-selectbase.h | |
parent | Only set unlogged for mocked tables on server versions 9.5 and above (diff) | |
download | libdbpp-postgresql-bac96d1b62dde949412a998cb0c3231ad179d870.tar.bz2 libdbpp-postgresql-bac96d1b62dde949412a998cb0c3231ad179d870.tar.xz libdbpp-postgresql-bac96d1b62dde949412a998cb0c3231ad179d870.zip |
Refactor to remove some duplication
Diffstat (limited to 'libpqpp/pq-selectbase.h')
-rw-r--r-- | libpqpp/pq-selectbase.h | 9 |
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; |