|
jonathan.abrahams, this ticket is not about documenting the db.collection.find() shell helper, but rather is about documenting the raw find command parameters. For context, in versions 3.0 and prior queries are transmitted to the server using the OP_QUERY/OP_REPLY protocol; the find and getMore commands constitute a new wire-level read protocol for version 3.2, built on top of the existing RPC-like commands mechanism. That's why you can now type,
db.foo.runCommand('find', {"readConcern": {"level": "majority"}})
|
or even
db.runCommand({find: "foo", filter: {a: 1}, readConcern: {level: "majority"}});
|
Keep in mind that a 3.2 shell connected to a 3.2 server will use the find/getMore commands read protocol automatically when you use the db.foo.find() shell method.
Anyway, to answer your original question, I don't think
db.foo.find({},{},99999999,0,1000,{"readConcern": {"level": "majority"}})
|
is valid syntax. The sixth argument to db.foo.find() is the "options" bit vector, used to set options like awaitData and slaveOk. I do not know our current plan for readConcern in the shell, i.e. whether we will have a helper and what syntax we will support. Mathias or Dannenberg might know better than me, as they have been more involved in the implementation of readConcern.
Hope that helps.
Best,
Dave
|
|
Question - Does this command permit the user to specify the readConcern?
db.foo.find({},{},99999999,0,1000,{"readConcern": {"level": "majority"}})
|
This is how it's done using runCommand:
db.foo.runCommand('find', {"readConcern": {"level": "majority"}})
|
|