summaryrefslogtreecommitdiff
path: root/libpqpp/selectcommand.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-06-02 01:42:13 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-06-02 01:42:13 +0100
commit2e2aafeb4c2c88e9eba977bcaf9b6a173612f511 (patch)
tree1515ef65b8ed39afe754c82d196427780bc2b2f3 /libpqpp/selectcommand.h
parentOverride Connection::execute with a specific version that doesn't involve the... (diff)
downloadlibdbpp-postgresql-2e2aafeb4c2c88e9eba977bcaf9b6a173612f511.tar.bz2
libdbpp-postgresql-2e2aafeb4c2c88e9eba977bcaf9b6a173612f511.tar.xz
libdbpp-postgresql-2e2aafeb4c2c88e9eba977bcaf9b6a173612f511.zip
Prebuild (once) SQL for cursor operations.
Don't open another transaction. Don't make another fetch to the DB if the previous read was short anyway. Add bulk load and bulk read tests.
Diffstat (limited to 'libpqpp/selectcommand.h')
-rw-r--r--libpqpp/selectcommand.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libpqpp/selectcommand.h b/libpqpp/selectcommand.h
index daa2707..6506e5e 100644
--- a/libpqpp/selectcommand.h
+++ b/libpqpp/selectcommand.h
@@ -19,10 +19,17 @@ namespace PQ {
private:
void fetchTuples();
+ std::string mkdeclare() const;
+ std::string mkfetch() const;
+ std::string mkclose() const;
+
mutable bool executed;
mutable bool txOpened;
- int nTuples, tuple;
+ int nTuples, tuple, fTuples;
PGresult * execRes;
+ std::string s_declare;
+ std::string s_fetch;
+ std::string s_close;
friend class Column;
};