summaryrefslogtreecommitdiff
path: root/libpqpp/pq-cursorselectcommand.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <daniel.goodliffe@pressassociation.com>2017-01-04 17:54:29 +0000
committerDan Goodliffe <daniel.goodliffe@pressassociation.com>2017-01-04 17:54:29 +0000
commit78c885ff3bcbb9c7e16f3fce29f1d0052aba3086 (patch)
treef67125295122714c8a0ad14e2f5a277e130dfd2a /libpqpp/pq-cursorselectcommand.cpp
parentUse bulk select not cursor select for getId, far fewer operations (diff)
downloadlibdbpp-postgresql-78c885ff3bcbb9c7e16f3fce29f1d0052aba3086.tar.bz2
libdbpp-postgresql-78c885ff3bcbb9c7e16f3fce29f1d0052aba3086.tar.xz
libdbpp-postgresql-78c885ff3bcbb9c7e16f3fce29f1d0052aba3086.zip
Add PQ specific command options to control page size and the use of bulk -v- cursor selects
Diffstat (limited to 'libpqpp/pq-cursorselectcommand.cpp')
-rw-r--r--libpqpp/pq-cursorselectcommand.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpqpp/pq-cursorselectcommand.cpp b/libpqpp/pq-cursorselectcommand.cpp
index ac4b825..d130b89 100644
--- a/libpqpp/pq-cursorselectcommand.cpp
+++ b/libpqpp/pq-cursorselectcommand.cpp
@@ -7,13 +7,13 @@ AdHocFormatter(PQCursorSelectDeclare, "DECLARE %? CURSOR FOR ");
AdHocFormatter(PQCursorSelectFetch, "FETCH %? IN %?");
AdHocFormatter(PQCursorSelectClose, "CLOSE %?");
-PQ::CursorSelectCommand::CursorSelectCommand(Connection * conn, const std::string & sql, unsigned int no) :
+PQ::CursorSelectCommand::CursorSelectCommand(Connection * conn, const std::string & sql, unsigned int no, const PQ::CommandOptions * pqco) :
DB::Command(sql),
PQ::SelectBase(sql),
PQ::Command(conn, sql, no),
executed(false),
txOpened(false),
- fTuples(35),
+ fTuples(pqco ? pqco->fetchTuples : 35),
s_fetch(PQCursorSelectFetch::get(fTuples, stmntName)),
s_close(PQCursorSelectClose::get(stmntName))
{