mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-01 17:25:03 +02:00
MongoDB: add missing name accessor to get database name. (#4020)
This commit is contained in:
parent
dd21b48d05
commit
9a2c16f55a
@ -45,6 +45,9 @@ public:
|
||||
virtual ~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);
|
||||
/// Authenticates against the database using the given connection,
|
||||
/// username and password, as well as authentication method.
|
||||
@ -160,6 +163,12 @@ private:
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& Database::name() const
|
||||
{
|
||||
return _dbname;
|
||||
}
|
||||
|
||||
|
||||
inline Poco::SharedPtr<Poco::MongoDB::QueryRequest> Database::createCommand() const
|
||||
{
|
||||
Poco::SharedPtr<Poco::MongoDB::QueryRequest> cmd = createQueryRequest("$cmd");
|
||||
|
Loading…
x
Reference in New Issue
Block a user