diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-01-03 21:54:21 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-01-03 21:54:21 +0000 |
commit | 3a69595903e29fe4dc27e3e7ba908b8875922a13 (patch) | |
tree | 4903af7be1700c9f98732b87ff23d27bf12f4731 /libpqpp | |
parent | Add missing delete showing false memory leak (diff) | |
download | libdbpp-postgresql-3a69595903e29fe4dc27e3e7ba908b8875922a13.tar.bz2 libdbpp-postgresql-3a69595903e29fe4dc27e3e7ba908b8875922a13.tar.xz libdbpp-postgresql-3a69595903e29fe4dc27e3e7ba908b8875922a13.zip |
No need for 1 line wrappers anymore
Diffstat (limited to 'libpqpp')
-rw-r--r-- | libpqpp/pq-cursorselectcommand.cpp | 23 | ||||
-rw-r--r-- | libpqpp/pq-cursorselectcommand.h | 2 |
2 files changed, 6 insertions, 19 deletions
diff --git a/libpqpp/pq-cursorselectcommand.cpp b/libpqpp/pq-cursorselectcommand.cpp index fbc14eb..952da3e 100644 --- a/libpqpp/pq-cursorselectcommand.cpp +++ b/libpqpp/pq-cursorselectcommand.cpp @@ -3,6 +3,10 @@ #include "pq-error.h" #include <compileTimeFormatter.h> +AdHocFormatter(PQCursorSelectDeclare, "DECLARE %? CURSOR FOR %?"); +AdHocFormatter(PQCursorSelectFetch, "FETCH %? IN %?"); +AdHocFormatter(PQCursorSelectClose, "CLOSE %?"); + PQ::CursorSelectCommand::CursorSelectCommand(Connection * conn, const std::string & sql, unsigned int no) : DB::Command(sql), PQ::SelectBase(sql), @@ -11,8 +15,8 @@ PQ::CursorSelectCommand::CursorSelectCommand(Connection * conn, const std::strin txOpened(false), fTuples(35), s_declare(mkdeclare()), - s_fetch(mkfetch()), - s_close(mkclose()) + s_fetch(PQCursorSelectFetch::get(fTuples, stmntName)), + s_close(PQCursorSelectClose::get(stmntName)) { } @@ -26,7 +30,6 @@ PQ::CursorSelectCommand::~CursorSelectCommand() } } -AdHocFormatter(PQCursorSelectDeclare, "DECLARE %? CURSOR FOR %?"); std::string PQ::CursorSelectCommand::mkdeclare() const { @@ -35,20 +38,6 @@ PQ::CursorSelectCommand::mkdeclare() const return PQCursorSelectDeclare::get(stmntName, psql); } -AdHocFormatter(PQCursorSelectFetch, "FETCH %? IN %?"); -std::string -PQ::CursorSelectCommand::mkfetch() const -{ - return PQCursorSelectFetch::get(fTuples, stmntName); -} - -AdHocFormatter(PQCursorSelectClose, "CLOSE %?"); -std::string -PQ::CursorSelectCommand::mkclose() const -{ - return PQCursorSelectClose::get(stmntName); -} - void PQ::CursorSelectCommand::execute() { diff --git a/libpqpp/pq-cursorselectcommand.h b/libpqpp/pq-cursorselectcommand.h index 9766f86..e7a67e6 100644 --- a/libpqpp/pq-cursorselectcommand.h +++ b/libpqpp/pq-cursorselectcommand.h @@ -20,8 +20,6 @@ namespace PQ { private: void fetchTuples(); std::string mkdeclare() const; - std::string mkfetch() const; - std::string mkclose() const; mutable bool executed; mutable bool txOpened; |