summaryrefslogtreecommitdiff
path: root/libpqpp/pq-bulkselectcommand.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-04-24 15:47:33 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-04-24 15:47:33 +0100
commit6340b06110c35b92bfcc780e85537ca5a752a58c (patch)
tree90e66849ef16ee7fac3ae0d00900ae684996002c /libpqpp/pq-bulkselectcommand.h
parentIntroduce select base for different kinds of select (diff)
downloadlibdbpp-postgresql-6340b06110c35b92bfcc780e85537ca5a752a58c.tar.bz2
libdbpp-postgresql-6340b06110c35b92bfcc780e85537ca5a752a58c.tar.xz
libdbpp-postgresql-6340b06110c35b92bfcc780e85537ca5a752a58c.zip
Support bulk selects which don't use cursors, always use of RETURNING
Diffstat (limited to 'libpqpp/pq-bulkselectcommand.h')
-rw-r--r--libpqpp/pq-bulkselectcommand.h29
1 files changed, 29 insertions, 0 deletions
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 <selectcommand.h>
+#include "pq-selectbase.h"
+#include "pq-command.h"
+#include <vector>
+#include <map>
+
+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
+
+