Simple wrappers of the API of MongoDB C driver mongo-c-driver, see MongoDB C Driver for more information.
More...
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
- Parameters
-
| [in] | bmeta | Instance of bson_t |
| [in] | key | |
- Returns
- true if succeed, otherwise false.]
- See also
- GetBoolFromBsonIterator()
◆ GetBoolFromBsonIterator()
| bool ccgl::db_mongoc::GetBoolFromBsonIterator |
( |
bson_iter_t * |
iter | ) |
|
Get Bool from the iterator (bson_iter_t) of bson_t
- Parameters
-
| [in] | iter | Iterator of an instance of bson_t |
- Returns
- true if succeed, otherwise false.
◆ GetDatetimeFromBson()
| time_t ccgl::db_mongoc::GetDatetimeFromBson |
( |
bson_t * |
bmeta, |
|
|
const char * |
key |
|
) |
| |
Get Datetime from bson_t
- Parameters
-
| [in] | bmeta | Instance of bson_t |
| [in] | key | |
- Returns
- float value (
time_t) if succeed, otherwise -1.
- See also
- GetDatetimeFromBsonIterator()
◆ GetDatetimeFromBsonIterator()
| time_t ccgl::db_mongoc::GetDatetimeFromBsonIterator |
( |
bson_iter_t * |
iter | ) |
|
Get Datetime from the iterator (bson_iter_t) of bson_t
- Parameters
-
| [in] | iter | Iterator of an instance of bson_t |
- Returns
- 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.
- Parameters
-
| [in] | bmeta | Instance of bson_t |
| [in] | key | |
| [in,out] | numericvalue | The extracted value which can be int, float, or double |
- Returns
- true if succeed, otherwise false.
- See also
- 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.
- Parameters
-
| [in] | iter | Iterator of an instance of bson_t |
| [in,out] | numericvalue | The extracted value which can be int, float, or double |
- Returns
- true if succeed, otherwise false.
◆ GetStringFromBson()
| string ccgl::db_mongoc::GetStringFromBson |
( |
bson_t * |
bmeta, |
|
|
const char * |
key |
|
) |
| |
Get String from bson_t
- Parameters
-
| [in] | bmeta | Instance of bson_t |
| [in] | key | |
- Returns
- String of value if succeed, otherwise empty string ("").
- See also
- GetStringFromBsonIterator()
◆ GetStringFromBsonIterator()
| string ccgl::db_mongoc::GetStringFromBsonIterator |
( |
bson_iter_t * |
iter | ) |
|
Get String from the iterator (bson_iter_t) of bson_t
- Parameters
-
| [in] | iter | Iterator of an instance of bson_t |
- Returns
- String of value if succeed, otherwise empty string ("").