summaryrefslogtreecommitdiff
path: root/libpqpp/pq-connection.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-connection.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-connection.cpp')
-rw-r--r--libpqpp/pq-connection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpqpp/pq-connection.cpp b/libpqpp/pq-connection.cpp
index 643e021..e189acf 100644
--- a/libpqpp/pq-connection.cpp
+++ b/libpqpp/pq-connection.cpp
@@ -101,7 +101,7 @@ PQ::Connection::newSelectCommand(const std::string & sql, const DB::CommandOptio
{
auto pqco = dynamic_cast<const CommandOptions *>(opts);
if (pqco && !pqco->useCursor) {
- return new BulkSelectCommand(this, sql, opts);
+ return new BulkSelectCommand(this, sql, pqco, opts);
}
return new CursorSelectCommand(this, sql, pqco, opts);
}
@@ -180,7 +180,7 @@ static const DB::CommandOptions selectLastValOpts(std::hash<std::string>()(selec
int64_t
PQ::Connection::insertId()
{
- BulkSelectCommand getId(this, selectLastVal, &selectLastValOpts);
+ BulkSelectCommand getId(this, selectLastVal, nullptr, &selectLastValOpts);
int64_t id = -1;
while (getId.fetch()) {
getId[0] >> id;