summaryrefslogtreecommitdiff
path: root/libpqpp/pq-command.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-command.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-command.cpp')
-rw-r--r--libpqpp/pq-command.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libpqpp/pq-command.cpp b/libpqpp/pq-command.cpp
index 5476393..9fd4002 100644
--- a/libpqpp/pq-command.cpp
+++ b/libpqpp/pq-command.cpp
@@ -32,16 +32,19 @@ PQ::Command::~Command()
PQ::CommandOptions::CommandOptions(std::size_t hash, const DB::CommandOptionsMap & map) :
DB::CommandOptions(hash),
fetchTuples(get(map, "page-size", 35)),
- useCursor(!isSet(map, "no-cursor"))
+ useCursor(!isSet(map, "no-cursor")),
+ fetchBinary(isSet(map, "fetch-binary"))
{
}
PQ::CommandOptions::CommandOptions(std::size_t hash,
unsigned int ft,
- bool uc) :
+ bool uc,
+ bool fb) :
DB::CommandOptions(hash),
fetchTuples(ft),
- useCursor(uc)
+ useCursor(uc),
+ fetchBinary(fb)
{
}