summaryrefslogtreecommitdiff
path: root/libmysqlpp/my-mock.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-12-31 04:59:00 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2016-12-31 04:59:00 +0000
commit626343c699d42aab176e740f5e75853f51290a49 (patch)
tree8cd84d4a8f7e7af739d627f9db000e8d786bb2c2 /libmysqlpp/my-mock.cpp
parentSet cxxflags specifically, not cflags (diff)
downloadlibdbpp-mysql-626343c699d42aab176e740f5e75853f51290a49.tar.bz2
libdbpp-mysql-626343c699d42aab176e740f5e75853f51290a49.tar.xz
libdbpp-mysql-626343c699d42aab176e740f5e75853f51290a49.zip
Do lots more work with compile time formatter instead runtime formatters
Diffstat (limited to 'libmysqlpp/my-mock.cpp')
-rw-r--r--libmysqlpp/my-mock.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libmysqlpp/my-mock.cpp b/libmysqlpp/my-mock.cpp
index bf02e11..2eee416 100644
--- a/libmysqlpp/my-mock.cpp
+++ b/libmysqlpp/my-mock.cpp
@@ -1,6 +1,6 @@
#include "my-connection.h"
#include "my-mock.h"
-#include <buffer.h>
+#include <compileTimeFormatter.h>
namespace MySQL {
@@ -11,10 +11,11 @@ Mock::Mock(const std::string & name, const std::vector<boost::filesystem::path>
PlaySchemaScripts(ss);
}
+AdHocFormatter(MockConnStr, "options=p2testmysql;database=%?");
DB::Connection *
Mock::openConnection() const
{
- return new Connection(stringbf("options=p2testmysql;database=%s", testDbName));
+ return new Connection(MockConnStr::get(testDbName));
}
Mock::~Mock()