From 08b7d094fd66243a9e945beaf46c130291cd656e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 2 Jun 2015 01:42:13 +0100 Subject: 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. --- libpqpp/selectcommand.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libpqpp/selectcommand.h') 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; }; -- cgit v1.2.3