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 | 85ac9163bc220e5b0669400d4003d72cd13271c8 (patch) | |
tree | b994e6f3052820f96e42ba9759e0b03ef132fa97 /libpqpp/pq-cursorselectcommand.cpp | |
parent | Add missing delete showing false memory leak (diff) | |
download | libdbpp-postgresql-85ac9163bc220e5b0669400d4003d72cd13271c8.tar.bz2 libdbpp-postgresql-85ac9163bc220e5b0669400d4003d72cd13271c8.tar.xz libdbpp-postgresql-85ac9163bc220e5b0669400d4003d72cd13271c8.zip |
No need for 1 line wrappers anymore
Diffstat (limited to 'libpqpp/pq-cursorselectcommand.cpp')
-rw-r--r-- | libpqpp/pq-cursorselectcommand.cpp | 23 |
1 files changed, 6 insertions, 17 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() { |