summaryrefslogtreecommitdiff
path: root/libpqpp/pq-command.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-02-04 19:48:03 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-02-04 19:48:03 +0000
commit5ac2273a3bf8831d5ceb1a1b5b9fcab27fb95c1e (patch)
tree8b482bdfbdd8a1e69e3464dd96614a182223d6d3 /libpqpp/pq-command.h
parentExplicit desctructor not required (diff)
downloadlibdbpp-postgresql-5ac2273a3bf8831d5ceb1a1b5b9fcab27fb95c1e.tar.bz2
libdbpp-postgresql-5ac2273a3bf8831d5ceb1a1b5b9fcab27fb95c1e.tar.xz
libdbpp-postgresql-5ac2273a3bf8831d5ceb1a1b5b9fcab27fb95c1e.zip
CTF for parameter binding
Diffstat (limited to 'libpqpp/pq-command.h')
-rw-r--r--libpqpp/pq-command.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpqpp/pq-command.h b/libpqpp/pq-command.h
index a26bae8..4123d4c 100644
--- a/libpqpp/pq-command.h
+++ b/libpqpp/pq-command.h
@@ -4,6 +4,7 @@
#include <command.h>
#include <libpq-fe.h>
#include <vector>
+#include <memory>
#include <visibility.h>
#include "pq-connection.h"
@@ -28,7 +29,6 @@ namespace PQ {
class Command : public virtual DB::Command {
public:
Command(Connection *, const std::string & sql, const DB::CommandOptionsCPtr &);
- virtual ~Command() = 0;
void bindParamI(unsigned int, int) override;
void bindParamI(unsigned int, long int) override;
@@ -59,12 +59,12 @@ namespace PQ {
void paramsAtLeast(unsigned int);
template<typename ... T>
- void paramSet(unsigned int, const char * fmt, const T & ... t);
+ void paramSet(unsigned int, const T & ... t);
void paramSet(unsigned int, const std::string_view &);
- std::vector<char *> values;
+ std::vector<const char *> values;
std::vector<int> lengths;
std::vector<int> formats;
- std::vector<std::string *> bufs;
+ std::vector<std::unique_ptr<std::string>> bufs;
};
}