diff options
author | Dan Goodliffe <daniel.goodliffe@pressassociation.com> | 2017-01-03 14:42:50 +0000 |
---|---|---|
committer | Dan Goodliffe <daniel.goodliffe@pressassociation.com> | 2017-01-03 14:42:50 +0000 |
commit | 3da79997cc80186051a0571b02b1619e76e96e2f (patch) | |
tree | 4d3e23ff41a6361f03d972e19cfc490db29cb409 /libpqpp | |
parent | Add function for retrieving server version number (diff) | |
download | libdbpp-postgresql-3da79997cc80186051a0571b02b1619e76e96e2f.tar.bz2 libdbpp-postgresql-3da79997cc80186051a0571b02b1619e76e96e2f.tar.xz libdbpp-postgresql-3da79997cc80186051a0571b02b1619e76e96e2f.zip |
Co-variant return of PQ connection from PQ mock
Diffstat (limited to 'libpqpp')
-rw-r--r-- | libpqpp/pq-mock.cpp | 2 | ||||
-rw-r--r-- | libpqpp/pq-mock.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libpqpp/pq-mock.cpp b/libpqpp/pq-mock.cpp index 2d081d1..97882ba 100644 --- a/libpqpp/pq-mock.cpp +++ b/libpqpp/pq-mock.cpp @@ -19,7 +19,7 @@ Mock::Mock(const std::string & masterdb, const std::string & name, const std::ve } AdHocFormatter(MockConnStr, "user=postgres dbname=%?"); -DB::Connection * +PQ::Connection * Mock::openConnection() const { return new Connection(MockConnStr::get(boost::algorithm::to_lower_copy(testDbName))); diff --git a/libpqpp/pq-mock.h b/libpqpp/pq-mock.h index 0081c5a..f712ef6 100644 --- a/libpqpp/pq-mock.h +++ b/libpqpp/pq-mock.h @@ -4,6 +4,7 @@ #include <mockDatabase.h> #include <boost/filesystem/path.hpp> #include <visibility.h> +#include "pq-connection.h" namespace PQ { class DLL_PUBLIC Mock : public DB::MockServerDatabase { @@ -11,7 +12,7 @@ namespace PQ { Mock(const std::string & master, const std::string & name, const std::vector<boost::filesystem::path> & ss); ~Mock(); - DB::Connection * openConnection() const override; + PQ::Connection * openConnection() const override; protected: void DropDatabase() const override; |