summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdbpp/mockDatabase.cpp6
-rw-r--r--libdbpp/mockDatabase.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/libdbpp/mockDatabase.cpp b/libdbpp/mockDatabase.cpp
index 9cb916f..db192bd 100644
--- a/libdbpp/mockDatabase.cpp
+++ b/libdbpp/mockDatabase.cpp
@@ -117,6 +117,12 @@ MockServerDatabase::~MockServerDatabase()
delete master;
}
+const std::string &
+MockServerDatabase::databaseName() const
+{
+ return testDbName;
+}
+
void
MockServerDatabase::CreateNewDatabase() const
{
diff --git a/libdbpp/mockDatabase.h b/libdbpp/mockDatabase.h
index 4cd9da1..7508881 100644
--- a/libdbpp/mockDatabase.h
+++ b/libdbpp/mockDatabase.h
@@ -56,6 +56,9 @@ class DLL_PUBLIC MockServerDatabase : public MockDatabase {
MockServerDatabase(const std::string & masterdb, const std::string & name, const std::string & type);
virtual ~MockServerDatabase();
+ /// Get the database instance name on the server.
+ const std::string & databaseName() const;
+
protected:
virtual void CreateNewDatabase() const override;
virtual void DropDatabase() const override;