From 4076ca685941ac433bc91130e29449cef7858fba Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 24 Apr 2016 15:47:33 +0100 Subject: Support bulk selects which don't use cursors, always use of RETURNING --- libpqpp/pq-bulkselectcommand.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 libpqpp/pq-bulkselectcommand.h (limited to 'libpqpp/pq-bulkselectcommand.h') diff --git a/libpqpp/pq-bulkselectcommand.h b/libpqpp/pq-bulkselectcommand.h new file mode 100644 index 0000000..aeda42d --- /dev/null +++ b/libpqpp/pq-bulkselectcommand.h @@ -0,0 +1,29 @@ +#ifndef PQ_BULKSELECTCOMMAND_H +#define PQ_BULKSELECTCOMMAND_H + +#include +#include "pq-selectbase.h" +#include "pq-command.h" +#include +#include + +namespace PQ { + class Connection; + class Column; + class BulkSelectCommand : public DB::SelectCommand, public SelectBase, public Command { + public: + BulkSelectCommand(Connection *, const std::string & sql, unsigned int no); + virtual ~BulkSelectCommand(); + + bool fetch() override; + void execute() override; + + private: + mutable bool executed; + std::string preparedSql; + }; +} + +#endif + + -- cgit v1.2.3