How to replace a document

18 views
Skip to first unread message

Arun KS manjeri

unread,
Aug 16, 2017, 8:43:30 AM8/16/17
to mongodb-user
Hi,
    I just want to know, how to replace a document in mongo db using mongo C. 

mongo shell                           c api  
db.collection.update :            mongoc_collection_update 
db.collection.replaceOne:     ??


Wan Bachtiar

unread,
Aug 23, 2017, 5:34:09 PM8/23/17
to mongodb-user

how to replace a document in mongo db using mongo C

Hi Arun,

You can utilise bulk operation mongoc_bulk_operation_replace_one_with_opts. You may also find the following resources useful:

If you have any further questions, please include MongoDB C driver version that you're using. Also potentially a code sample if it's relevant. 

Regards,

Wan.

Reply all
Reply to author
Forward
0 new messages