MONGOC_BULK_OP...ION_DELETE_ONE(3)

πŸ’– MONGOC_BULK_OP...ION_DELETE_ONE πŸ’–

okay bestie, so we're looking at the mongoc_bulk_operation_delete_one page from libmongoc, and I need you to sit down for this one because there's some lore first 🫢


🚨 WARNING 🚨

Deprecated since version 0.96.0: Use mongoc_bulk_operation_remove_one() instead.

like... she's retired, bestie 😭 she served her time, but the girlies have moved on. if you're writing new code, do not reach for this one.


✨ SYNOPSIS ✨

void
mongoc_bulk_operation_delete_one (mongoc_bulk_operation_t *bulk,
                                  const bson_t *selector);

So what does she do? She deletes a single document as part of a bulk operation. πŸ’…

But here's the thing β€” and this is the part everyone skips β€” she only queues the operation. That's it. She doesn't actually go do it. To make it actually happen, you have to call mongoc_bulk_operation_execute(). no cap. it's giving "adding to cart" not "checkout" πŸ›’βœ¨


πŸŽ€ PARAMETERS πŸŽ€

  • bulk: A mongoc_bulk_operation_t. (the main character, obviously)
  • selector: A bson_t. (the who-are-we-deleting)

πŸ’€ ERRORS πŸ’€

Errors are propagated via mongoc_bulk_operation_execute(). so like, don't come for this function when something goes wrong, she's not the one reporting it 🫠

πŸ‘€ SEE ALSO πŸ‘€

  • mongoc_bulk_operation_remove_one_with_opts()
  • mongoc_bulk_operation_remove_many_with_opts()

🌸 AUTHOR 🌸

MongoDB, Inc


2009-present, MongoDB, Inc.


and that's the whole page, bestie πŸ’– written by MongoDB, Inc, version 1.30.13, dated Oct 09 β€” mwah, sending you a forehead kiss, now go call mongoc_bulk_operation_remove_one() instead πŸ§šβœ¨πŸ¦‹

πŸ“¦ where this page comes from