MongoCollection.findAndModify

Combines a modify and find operation to a single atomic operation.

  1. Bson findAndModify(T query, U update, V returnFieldSelector)
  2. Bson findAndModify(T query, U update)
    struct MongoCollection
    Bson
    findAndModify
    (
    T
    U
    )

Parameters

query T

MongoDB query expression to identify the matched document

update U

Update expression for the matched document

Throws

An Exception will be thrown if an error occurs in the communication with the database server.

See Also

Meta