diff --git a/Data/include/Poco/Data/Session.h b/Data/include/Poco/Data/Session.h index d599a557b..16b0abf99 100644 --- a/Data/include/Poco/Data/Session.h +++ b/Data/include/Poco/Data/Session.h @@ -273,6 +273,9 @@ public: /// Returns true iff the transaction isolation level corresponds /// to the supplied bitmask. + std::string connector(); + /// Returns the connector name for this session. + std::string uri(); /// Returns the URI for this session. @@ -439,6 +442,12 @@ inline bool Session::isTransactionIsolation(Poco::UInt32 ti) } +inline std::string Session::connector() +{ + return _pImpl->connectorName(); +} + + inline std::string Session::uri(const std::string& connector, const std::string& connectionString) { diff --git a/Data/testsuite/src/DataTest.cpp b/Data/testsuite/src/DataTest.cpp index d99fc9d0b..44bfd5c87 100644 --- a/Data/testsuite/src/DataTest.cpp +++ b/Data/testsuite/src/DataTest.cpp @@ -111,6 +111,7 @@ void DataTest::testSession() { Session sess(SessionFactory::instance().create("test", "cs")); assert ("test" == sess.impl()->connectorName()); + assert (sess.connector() == sess.impl()->connectorName()); assert ("cs" == sess.impl()->connectionString()); assert ("test:///cs" == sess.uri());