I have a quick question, what is the fast way to grab and delete an object from a mongo collection. Here is the code, I have currently:
$cursor = $coll->find(
I make a new answer to remark the fact:
As commented by @peterscodeproblems in the accepted answer. The native way to this in mongodb right now is to use the
findAndModify(query=, remove=True)
As pointed out by the documentation.
As it is native, and atomic, I expect this to be the faster way to do this.