MongoCollection.findAndModify

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

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

Parameters

query T

MongoDB query expression to identify the matched document

update U

Update expression for the matched document

returnFieldSelector V

Optional map of fields to return in the response

Throws

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

See Also

Meta