classafMongo::MongoCmd
sys::Obj afMongo::MongoCmd
The principle class that communicates with MongoDB.
- add
Adds the given
val
- but only if it does not aleady exist in the cmd.If
val
is null, it is not added.Use to chain
add()
methods.- addAll
Adds all the given vals - but only if they don't already exist in the cmd.
If
all
is null, it is not added.Use to chain
add()
methods.- cmd
The backing cmd document.
- cmdName
const Str cmdName
- cmdVal
const Obj? cmdVal
- connMgr
const MongoConnMgr connMgr
- containsKey
Returns
true
if this cmd contains the given key.- cursor
MongoCur cursor()
Executes this cmd on the MongoDB server, and preemptively interprets the response as a cursor.
- dbName
const Str dbName
- extract
- get
- make
new make(MongoConnMgr connMgr, Str dbName, Str cmdName, Obj? cmdVal := 1)
Creates a new
MongoCmd
.- run
Str:Obj? run(Bool checked := true)
Executes this cmd on the MongoDB server, and returns the response as a BSON document.
- set
- withFn
Like
with()
, butfn
may benull
.