mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 11:31:53 +01:00
MongoDB: add missing name accessor to get database name. (#4020)
This commit is contained in:
@@ -45,6 +45,9 @@ public:
|
|||||||
virtual ~Database();
|
virtual ~Database();
|
||||||
/// Destroys the Database.
|
/// Destroys the Database.
|
||||||
|
|
||||||
|
const std::string& name() const;
|
||||||
|
/// Database name
|
||||||
|
|
||||||
bool authenticate(Connection& connection, const std::string& username, const std::string& password, const std::string& method = AUTH_SCRAM_SHA1);
|
bool authenticate(Connection& connection, const std::string& username, const std::string& password, const std::string& method = AUTH_SCRAM_SHA1);
|
||||||
/// Authenticates against the database using the given connection,
|
/// Authenticates against the database using the given connection,
|
||||||
/// username and password, as well as authentication method.
|
/// username and password, as well as authentication method.
|
||||||
@@ -160,6 +163,12 @@ private:
|
|||||||
//
|
//
|
||||||
// inlines
|
// inlines
|
||||||
//
|
//
|
||||||
|
inline const std::string& Database::name() const
|
||||||
|
{
|
||||||
|
return _dbname;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Poco::SharedPtr<Poco::MongoDB::QueryRequest> Database::createCommand() const
|
inline Poco::SharedPtr<Poco::MongoDB::QueryRequest> Database::createCommand() const
|
||||||
{
|
{
|
||||||
Poco::SharedPtr<Poco::MongoDB::QueryRequest> cmd = createQueryRequest("$cmd");
|
Poco::SharedPtr<Poco::MongoDB::QueryRequest> cmd = createQueryRequest("$cmd");
|
||||||
|
|||||||
Reference in New Issue
Block a user