MONGOC_BULK_O...MANY_WITH_OPTS(3)
π MONGOC_BULK_O...MANY_WITH_OPTS(3) π
okay so bestie, welcome to the glow-up of mongoc_bulk_operation_remove_many_with_opts π this is straight out of the libmongoc manual (that's the manual name, periodt), and it's the function you call when you wanna yeet a whole bunch of docs into the deletion queue πΈ
β¨ SYNOPSIS β¨
bool
mongoc_bulk_operation_remove_many_with_opts (mongoc_bulk_operation_t *bulk,
const bson_t *selector,
const bson_t *opts,
bson_error_t *error); /* OUT */
So what it does: it deletes documents as part of a bulk operation π«Ά but likeβ¦ heads up, it only queues the operation, it does NOT run it. To actually execute, you gotta call mongoc_bulk_operation_execute(). No cap, queuing β executing π
π PARAMETERS π
bulkβ amongoc_bulk_operation_t. your main character bulk operation β¨selectorβ abson_tthat selects which document to remove π (yes, "document" singular in the original, we don't make the rules, we just deliver them)errorβ an optional location for abson_error_t, orNULLπ if you're feeling brave
opts may be NULL or a BSON document with extra command options, and those options are: π¦
collationβ configure textual comparisons. see Setting Collation Order, and the MongoDB Manual entry on Collation π collation requires MongoDB 3.2 or later, otherwise an error is returned β οΈhintβ a document or string that specifies the index to use to support the query predicate π§
π ERRORS π
okay so, two totally different lanes here: operation errors are propagated via mongoc_bulk_operation_execute() π while argument validation errors are reported by the error argument. different channels, different vibes, don't mix 'em up π
β RETURNS β
returns true on success π and false if passed invalid arguments π
that's it, that's the return value.
π SEE ALSO
mongoc_bulk_operation_remove()mongoc_bulk_operation_remove_one_with_opts()
πΈ AUTHOR πΈ
MongoDB, Inc π
π COPYRIGHT π
2009-present, MongoDB, Inc.
and that's the whole page bestie, slay π β¨ version 2.5.6, dated Oct 09, 2026 β go forth and delete responsibly ππ¦π₯
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms