summaryrefslogtreecommitdiff
path: root/libodbcpp/odbc-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
commitcadf2251ea3fa4f651726223e5426703f9a94a62 (patch)
tree6e3cec26902b34198d03494f12a10648cc8b7b70 /libodbcpp/odbc-mock.cpp
parentSet cxxflags specifically, not cflags (diff)
downloadlibdbpp-odbc-cadf2251ea3fa4f651726223e5426703f9a94a62.tar.bz2
libdbpp-odbc-cadf2251ea3fa4f651726223e5426703f9a94a62.tar.xz
libdbpp-odbc-cadf2251ea3fa4f651726223e5426703f9a94a62.zip
Do lots more work with compile time formatter instead runtime formatters
Diffstat (limited to 'libodbcpp/odbc-mock.cpp')
-rw-r--r--libodbcpp/odbc-mock.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libodbcpp/odbc-mock.cpp b/libodbcpp/odbc-mock.cpp
index 2799fb3..0ab6ee6 100644
--- a/libodbcpp/odbc-mock.cpp
+++ b/libodbcpp/odbc-mock.cpp
@@ -1,6 +1,6 @@
#include "odbc-connection.h"
#include "odbc-mock.h"
-#include <buffer.h>
+#include <compileTimeFormatter.h>
namespace ODBC {
@@ -12,10 +12,11 @@ Mock::Mock(const std::string & b, const std::string & masterdb, const std::strin
PlaySchemaScripts(ss);
}
+AdHocFormatter(MockConnStr, "%?;Database=%?");
DB::Connection *
Mock::openConnection() const
{
- return new Connection(stringbf("%s;Database=%s", base, testDbName));
+ return new Connection(MockConnStr::get(base, testDbName));
}
Mock::~Mock()