Bulk operations with mongocxx 3.1.1

27 views
Skip to first unread message

Sachinthya Wagaarachchi

unread,
Jan 2, 2017, 12:14:27 PM1/2/17
to mongodb-user

How do I execute bulk operations with the new Mongocxx driver? The driver manual is horrible. And there are no examples anywhere!!!


Relevant class: http://mongodb.github.io/mongo-cxx-driver/api/mongocxx-3.1.1/classmongocxx_1_1bulk__write.html


I can create an operation using bulk_write::bulk_write() and add queries using bulk_write::append(). But I am confused as to how to execute it.


It's terrible that they don't provide similar functions like the mongo shell. Ex: https://docs.mongodb.com/manual/reference/method/Bulk/



Andrew Morrow

unread,
Jan 2, 2017, 12:22:05 PM1/2/17
to mongod...@googlegroups.com

Hi -

The bulk write example should give an overview of how this is done with the mongocxx driver.

Thanks,
Andrew

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/c1517753-67f0-48d8-bfa1-a96f61314156%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages