MongoDB C Driver API continues

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.