From 19609c41b15a818df30508576f50fc0eddc11636 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 5 Jun 2017 18:53:22 +0100 Subject: Support fetching data in binary format (no numeric, datetime, interval support yet) --- libpqpp/pq-bulkselectcommand.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libpqpp/pq-bulkselectcommand.cpp') 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; -- cgit v1.2.3