summaryrefslogtreecommitdiff
path: root/libpqpp/pq-bulkselectcommand.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2017-06-05 18:53:22 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2017-06-05 18:53:22 +0100
commit19609c41b15a818df30508576f50fc0eddc11636 (patch)
treeb7b36a9e69689fd2be7c0660728af59eacb02d10 /libpqpp/pq-bulkselectcommand.cpp
parentAdd wrappers for PQgetvalue and PQgetlength in column to simplify access (diff)
downloadlibdbpp-postgresql-19609c41b15a818df30508576f50fc0eddc11636.tar.bz2
libdbpp-postgresql-19609c41b15a818df30508576f50fc0eddc11636.tar.xz
libdbpp-postgresql-19609c41b15a818df30508576f50fc0eddc11636.zip
Support fetching data in binary format (no numeric, datetime, interval support yet)
Diffstat (limited to 'libpqpp/pq-bulkselectcommand.cpp')
-rw-r--r--libpqpp/pq-bulkselectcommand.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpqpp/pq-bulkselectcommand.cpp b/libpqpp/pq-bulkselectcommand.cpp
index ab44df5..c9abec5 100644
--- a/libpqpp/pq-bulkselectcommand.cpp
+++ b/libpqpp/pq-bulkselectcommand.cpp
@@ -3,9 +3,9 @@
#include "pq-column.h"
#include "pq-error.h"
-PQ::BulkSelectCommand::BulkSelectCommand(Connection * conn, const std::string & sql, const DB::CommandOptions * opts) :
+PQ::BulkSelectCommand::BulkSelectCommand(Connection * conn, const std::string & sql, const PQ::CommandOptions * pqco, const DB::CommandOptions * opts) :
DB::Command(sql),
- PQ::SelectBase(sql),
+ PQ::SelectBase(sql, pqco),
PQ::PreparedStatement(conn, sql, opts),
executed(false)
{
@@ -16,7 +16,7 @@ PQ::BulkSelectCommand::execute()
{
if (!executed) {
execRes = c->checkResult(
- PQexecPrepared(c->conn, prepare(), values.size(), &values.front(), &lengths.front(), &formats.front(), 0),
+ PQexecPrepared(c->conn, prepare(), values.size(), &values.front(), &lengths.front(), &formats.front(), binary),
PGRES_TUPLES_OK);
nTuples = PQntuples(execRes);
tuple = -1;