summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2017-05-04 21:25:32 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2017-05-04 21:25:32 +0100
commitb0a5b94ddfec22d587d58959984c184a54c87c41 (patch)
tree0f64a932385dee39f0608285783f9b338dcf138d
parentBasics working, could do with a tidy up around mocking (diff)
downloadlibdbpp-mysql-embedded.tar.bz2
libdbpp-mysql-embedded.tar.xz
libdbpp-mysql-embedded.zip
Update to v1.1.x interfaceembedded
-rw-r--r--libmysqlpp/embeddedmy-mock.cpp4
-rw-r--r--libmysqlpp/my-connection.cpp2
-rw-r--r--libmysqlpp/my-connection.h2
-rw-r--r--libmysqlpp/my-opts.h1
4 files changed, 5 insertions, 4 deletions
diff --git a/libmysqlpp/embeddedmy-mock.cpp b/libmysqlpp/embeddedmy-mock.cpp
index 9e66bb3..dfa8cbe 100644
--- a/libmysqlpp/embeddedmy-mock.cpp
+++ b/libmysqlpp/embeddedmy-mock.cpp
@@ -32,14 +32,14 @@ namespace MySQL {
auto path = mockDbPath();
embeddedServer = Server::getMock(path);
Connection initialize(embeddedServer.get(), "mysql");
- initialize.execute("CREATE DATABASE " + dbname);
+ initialize.execute("CREATE DATABASE " + dbname, NULL);
}
void
Mock::DropDatabase() const
{
Connection initialize(embeddedServer.get(), "mysql");
- initialize.execute("DROP DATABASE " + dbname);
+ initialize.execute("DROP DATABASE " + dbname, NULL);
}
boost::filesystem::path
diff --git a/libmysqlpp/my-connection.cpp b/libmysqlpp/my-connection.cpp
index 2be253b..d22312d 100644
--- a/libmysqlpp/my-connection.cpp
+++ b/libmysqlpp/my-connection.cpp
@@ -125,7 +125,7 @@ MySQL::Connection::newModifyCommand(const std::string & sql, const DB::CommandOp
}
void
-MySQL::Connection::execute(const std::string & sql)
+MySQL::Connection::execute(const std::string & sql, const DB::CommandOptions *)
{
if (mysql_query(&conn, sql.c_str())) {
throw Error(&conn);
diff --git a/libmysqlpp/my-connection.h b/libmysqlpp/my-connection.h
index 36e9388..27f5312 100644
--- a/libmysqlpp/my-connection.h
+++ b/libmysqlpp/my-connection.h
@@ -35,7 +35,7 @@ namespace MySQL {
size_t bulkUploadData(const char *, size_t) const override;
int64_t insertId() override;
- void execute(const std::string &) override;
+ void execute(const std::string &, const DB::CommandOptions *) override;
mutable MYSQL conn;
diff --git a/libmysqlpp/my-opts.h b/libmysqlpp/my-opts.h
index e444fa8..3abd271 100644
--- a/libmysqlpp/my-opts.h
+++ b/libmysqlpp/my-opts.h
@@ -3,6 +3,7 @@
#include <boost/optional.hpp>
#include <string>
+#include <vector>
#include <visibility.h>
namespace MySQL {