rejectedsoftware/vibe.d — pull request #911 by intrica (2014-12-03 00:47:24+00:00)
Title: Allow findAndModify to take an options parameter: BREAKING CHANGE

The third parameter to findAndModify was previously set as the returnFieldSelector. The problem with this is that the findAndModify function in mongo takes quite a large number of optional parameters, such as the very commonly used "new" parameter.

This fix replaces the third parameter with an options argument which should take anything that can be iterated as an associative array (such as a Json or Bson object)

Example:

```D
auto result = collection.findAndModify(
["_id": Bson(_id), "count": Bson(count)],
["$inc": Bson(["count": Bson(1)],
["new": true]
);
```

To achieve this, I have strayed away from using the CMD struct, but the struct doesn't allow for optional parameters.