diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-06-05 18:53:22 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-06-05 18:53:22 +0100 |
commit | 19609c41b15a818df30508576f50fc0eddc11636 (patch) | |
tree | b7b36a9e69689fd2be7c0660728af59eacb02d10 /libpqpp/pq-bulkselectcommand.cpp | |
parent | Add wrappers for PQgetvalue and PQgetlength in column to simplify access (diff) | |
download | libdbpp-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.cpp | 6 |
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; |