diff options
Diffstat (limited to 'libodbcpp/odbc-mock.cpp')
-rw-r--r-- | libodbcpp/odbc-mock.cpp | 5 |
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() |