classafMongo::Operation

sys::Obj
  afMongo::Operation

(Advanced) The low level transport mechanism that talks to MongoDB instances.

This is, actually, the only class you need to talk to a MongoDB instance! All other classes merely wrap calls to this.

This class, and the BSON reader / writer classes, have been optomised for memory efficiency. Feel free to send your 16Mb+ documents to MongoDB for they'll be streamed straight out over the socket.

@see https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/

getMore

Source

OpReplyResponse getMore(Str qname, Int limit, Int cursorId)

killCursors

Source

Void killCursors(Int[] cursorIds)

make

Source

new make(Connection connection)

Creates an Operation with the given connection.

query

Source

OpReplyResponse query(Str qname, Str:Obj? query, Int limit := 0, Int skip := 0, [Str:Obj?]? fields := null, OpQueryFlags flags := OpQueryFlags.none)

Queries MongoDB for documents in a collection.

@see https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/#op-query

readReply

Source

OpReplyResponse readReply(Int? requestId)

Reads a reply from the server.

requestId may be null when gulping down replies resulting from an exhaust query.

runCommand

Source

Str:Obj? runCommand(Str qname, Str:Obj? cmd, Bool checked := true)

Runs the given Mongo command and returns the reply document.