|
One concern we have about adding a SetQuery method to MongoCursor<T> is that while it seems like a trivial change, and consistent with other SetXyz methods that already exist, is that the query seems central to the nature of the MongoCursor and if you change the query in some sense it is no longer the same MongoCursor.
Consider the following sample code:
var cursor = collection.FindAll();
|
...
|
|
cursor.SetQuery(someQuery); // whoa, it no longer returns All documents...
|
Or another example:
var females = collection.Find(Query.EQ("Gender", "F"));
|
...
|
females.SetQuery(Query.EQ("Gender", "M")); // whoa, completely changed the meaning of the cursor
|
|