query property

Map<String, dynamic>? query
getter/setter pair

The selection criteria for the modification. The query field employs the same query selectors as used in the db.collection.find() method. Although the query may match multiple documents, findAndModify will only select one document to modify.

If unspecified, defaults to an empty document.

Starting in MongoDB 4.2 (and 4.0.12+, 3.6.14+, and 3.4.23+), the operation errors if the query argument is not a document.

Implementation

Map<String, dynamic>? query;