Before opening
<1,mongoc_init () func>
Mongoc_init ()Synopsis
voidmongoc_init (void);
Description
This function should is called at the beginning of the every program using the MongoDB C driver. It is responsible for initializing global state such as process counters, SSL, and threading primatives.
When your process have completed, you should also call Mongoc_clearup ()
<2,mongoc_cleanup () func>
Mongoc_cleanup ()Synopsis
voidmongoc_cleanup (void);
Description
This function is a responsible for cleaning and after use of the MongoDB C driver. It'll release any lingering allocated memory which can is useful when running under Valgrind.
1,insert Document
Part Statement Codeexample:
Runing Example:
2,update Document
3,finding a document
Follow specifying a query
Find a SPECIFYC document maching {"Hello": "World"}
Db.users.stats ()
4,execing a command
MongoDB C Driver API continues