6 #include "knowrob/storage/mongo/BulkOperation.h"
7 #include "knowrob/storage/mongo/MongoException.h"
17 mongoc_bulk_operation_destroy(
handle_);
27 MONGOC_ERROR_COMMAND_INVALID_ARG,
28 "bulk operation can only be executed once");
37 if (!mongoc_bulk_operation_insert_with_opts(
51 if (!mongoc_bulk_operation_remove_one_with_opts(
65 if (!mongoc_bulk_operation_remove_many_with_opts(
79 if (!mongoc_bulk_operation_update_many_with_opts(
94 bson_error_t bulk_err;
97 bool success = mongoc_bulk_operation_execute(
handle_, &bulk_reply, &bulk_err);
99 bson_destroy(&bulk_reply);
100 mongoc_bulk_operation_destroy(
handle_);
void pushRemoveOne(const bson_t *document)
void pushInsert(const bson_t *document)
void validateBulkHandle()
mongoc_bulk_operation_t * handle_
void pushUpdate(bson_t *query, bson_t *update)
BulkOperation(mongoc_bulk_operation_t *handle)
void pushRemoveAll(const bson_t *document)