A simple wrapper of the class of MongoDB Client mongoc_client_t.
更多...
#include <db_mongoc.h>
Public 成员函数 | |
| MongoClient (const char *host, vuint16_t port) | |
| Constructor using IP address and port number | |
| MongoClient (mongoc_client_t *conn) | |
| Constructor using mongoc_client_t* | |
| ~MongoClient () | |
| Destructor | |
| void | Destroy () |
| Destroy explicitly | |
| mongoc_client_t * | GetConn () |
Get mongoc_client_t instance | |
| mongoc_database_t * | GetDatabase (string const &dbname) |
Get existing or newly created mongoc_database_t instance | |
| mongoc_collection_t * | GetCollection (string const &dbname, string const &collectionname) |
Get mongoc_collection_t instance | |
| mongoc_gridfs_t * | GetGridFs (string const &dbname, string const &gfsname) |
Get mongoc_gridfs_t instance | |
| MongoGridFs * | GridFs (string const &dbname, string const &gfsname) |
| Get MongoGridFs instance | |
| void | GetDatabaseNames (vector< string > &dbnames) |
| Get existing database names | |
| void | GetCollectionNames (string const &dbname, vector< string > &collnames) |
| Get collection names in MongoDB database | |
| void | GetGridFsFileNames (string const &dbname, string const &gfsname, vector< string > &gfs_exists) |
| Get GridFs file names in MongoDB database | |
静态 Public 成员函数 | |
| static MongoClient * | Init (const char *host, vuint16_t port) |
| Initialization of MongoClient with the validation check of database | |
A simple wrapper of the class of MongoDB Client mongoc_client_t.