const classafMongo::OpQueryFlags
sys::Obj afMongo::Flag afMongo::OpQueryFlags
(Advanced) Flags to use with Cursors
in Collection.find().
@see https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/#op-query
- awaitData
const static OpQueryFlags awaitData := OpQueryFlags.<ctor>(32, "AwaitData")
Use with TailableCursor. If we are at the end of the data, block for a while rather than returning no data.
- exhaust
const static OpQueryFlags exhaust := OpQueryFlags.<ctor>(64, "Exhaust")
Stream the data down full blast in multiple "more" packages. Use when reading all the results of a query.
- noCursorTimeout
const static OpQueryFlags noCursorTimeout := ...
The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use. Set this option to prevent that.
- none
const static OpQueryFlags none := OpQueryFlags.<ctor>(0, "None")
No flags are set. Business as usual.
- partial
const static OpQueryFlags partial := OpQueryFlags.<ctor>(128, "Partial")
Get partial results from a
mongos
if some shards are down (instead of throwing an error).- slaveOk
const static OpQueryFlags slaveOk := OpQueryFlags.<ctor>(4, "SlaveOk")
Allow query of replica slave. Normally these return an error except for namespace "local".
- tailableCursor
const static OpQueryFlags tailableCursor := OpQueryFlags.<ctor>(2, "TailableCursor")
Tailable means cursor is not closed when the last data is retrieved.