Simple wrappers of the API of MongoDB C driver mongo-c-driver, see MongoDB C Driver for more information.
更多...
|
| class | MongoClient |
| | A simple wrapper of the class of MongoDB Client mongoc_client_t. 更多...
|
| |
| class | MongoCollection |
| | A simple wrapper of the class of MongoDB Collection mongoc_collection_t. 更多...
|
| |
| class | MongoDatabase |
| | A simple wrapper of the class of MongoDB database mongoc_database_t. 更多...
|
| |
| class | MongoGridFs |
| | A simple wrapper of the class of MongoDB database mongoc_gridfs_t. 更多...
|
| |
|
|
void | AppendStringOptionsToBson (bson_t *bson_opts, const STRING_MAP &opts, const string &prefix=string()) |
| | Append options to bson_t
|
| |
| template<typename T > |
| bool | GetNumericFromBsonIterator (bson_iter_t *iter, T &numericvalue) |
| | Get numeric value from the iterator (bson_iter_t) of bson_taccording to a given key 更多...
|
| |
|
template<typename T > |
| void | GetVectorFromBsonIter (bson_iter_t *iter, vector< T > &out) |
| | parse the following nested vector from bson_t: [1, 2, 3]
|
| |
|
template<typename T > |
| void | GetVectorVectorFromBsonIter (bson_iter_t *iter, vector< vector< T > > &out) |
| | parse the following nested vector from bson_t: [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]
|
| |
| template<typename T > |
| bool | GetNumericFromBson (bson_t *bmeta, const char *key, T &numericvalue) |
| | Get numeric value from bson_t according to a given key 更多...
|
| |
| string | GetStringFromBsonIterator (bson_iter_t *iter) |
| | Get String from the iterator (bson_iter_t) of bson_t 更多...
|
| |
| string | GetStringFromBson (bson_t *bmeta, const char *key) |
| | Get String from bson_t 更多...
|
| |
| bool | GetBoolFromBsonIterator (bson_iter_t *iter) |
| | Get Bool from the iterator (bson_iter_t) of bson_t 更多...
|
| |
| bool | GetBoolFromBson (bson_t *bmeta, const char *key) |
| | Get String from bson_t 更多...
|
| |
| time_t | GetDatetimeFromBsonIterator (bson_iter_t *iter) |
| | Get Datetime from the iterator (bson_iter_t) of bson_t 更多...
|
| |
| time_t | GetDatetimeFromBson (bson_t *bmeta, const char *key) |
| | Get Datetime from bson_t 更多...
|
| |
Simple wrappers of the API of MongoDB C driver mongo-c-driver, see MongoDB C Driver for more information.
◆ GetBoolFromBson()
| bool ccgl::db_mongoc::GetBoolFromBson |
( |
bson_t * |
bmeta, |
|
|
const char * |
key |
|
) |
| |
Get String from bson_t
- 参数
-
| [in] | bmeta | Instance of bson_t |
| [in] | key | |
- 返回
- true if succeeded, otherwise false.
- 参见
- GetBoolFromBsonIterator()
◆ GetBoolFromBsonIterator()
| bool ccgl::db_mongoc::GetBoolFromBsonIterator |
( |
bson_iter_t * |
iter | ) |
|
Get Bool from the iterator (bson_iter_t) of bson_t
- 参数
-
| [in] | iter | Iterator of an instance of bson_t |
- 返回
- true if succeed, otherwise false.
◆ GetDatetimeFromBson()
| time_t ccgl::db_mongoc::GetDatetimeFromBson |
( |
bson_t * |
bmeta, |
|
|
const char * |
key |
|
) |
| |
◆ GetDatetimeFromBsonIterator()
| time_t ccgl::db_mongoc::GetDatetimeFromBsonIterator |
( |
bson_iter_t * |
iter | ) |
|
Get Datetime from the iterator (bson_iter_t) of bson_t
- 参数
-
| [in] | iter | Iterator of an instance of bson_t |
- 返回
- float value (
time_t) if succeed, otherwise -1.
◆ GetNumericFromBson()
template<typename T >
| bool ccgl::db_mongoc::GetNumericFromBson |
( |
bson_t * |
bmeta, |
|
|
const char * |
key, |
|
|
T & |
numericvalue |
|
) |
| |
Get numeric value from bson_t according to a given key
- 参数
-
| [in] | bmeta | Instance of bson_t |
| [in] | key | |
| [in,out] | numericvalue | The extracted value which can be int, float, or double |
- 返回
- true if succeed, otherwise false.
- 参见
- GetNumericFromBsonIterator()
◆ GetNumericFromBsonIterator()
template<typename T >
| bool ccgl::db_mongoc::GetNumericFromBsonIterator |
( |
bson_iter_t * |
iter, |
|
|
T & |
numericvalue |
|
) |
| |
Get numeric value from the iterator (bson_iter_t) of bson_taccording to a given key
- 参数
-
| [in] | iter | Iterator of an instance of bson_t |
| [in,out] | numericvalue | The extracted value which can be int, float, or double |
- 返回
- true if succeed, otherwise false.
◆ GetStringFromBson()
| string ccgl::db_mongoc::GetStringFromBson |
( |
bson_t * |
bmeta, |
|
|
const char * |
key |
|
) |
| |
Get String from bson_t
- 参数
-
| [in] | bmeta | Instance of bson_t |
| [in] | key | |
- 返回
- String of value if succeed, otherwise empty string ("").
- 参见
- GetStringFromBsonIterator()
◆ GetStringFromBsonIterator()
| string ccgl::db_mongoc::GetStringFromBsonIterator |
( |
bson_iter_t * |
iter | ) |
|
Get String from the iterator (bson_iter_t) of bson_t
- 参数
-
| [in] | iter | Iterator of an instance of bson_t |
- 返回
- String of value if succeed, otherwise empty string ("").