MongoDB C++ Driver
legacy-1.1.2
|
Public Member Functions | |
virtual WriteOpType | operationType () const |
Returns the MongoDB wire protocol operation type represented by an instance of this particular write operation. | |
virtual const char * | batchName () const |
Returns the name for a batch of this type of write operation. | |
virtual int | incrementalSize () const |
Returns the incremental size (in bytes) required to add this write operation to a batch. | |
virtual void | startRequest (const std::string &ns, bool ordered, BufBuilder *builder) const |
Appends the preamble for a wire protocol message into the supplied BufBuilder. More... | |
virtual void | appendSelfToRequest (BufBuilder *builder) const |
Appends a document (or documents in the case of update) which describe the write operation represented by an instance of this class into the supplied BufBuilder. More... | |
virtual void | startCommand (const std::string &ns, BSONObjBuilder *command) const |
Appends the preamble for a write command into the supplied BSONObjBuilder. More... | |
virtual void | appendSelfToCommand (BSONArrayBuilder *batch) const |
Appends a single document that describes the write operation represented by an instance of this class into the supplied BSONArrayBuilder. More... | |
virtual void | appendSelfToBSONObj (BSONObjBuilder *obj) const |
Appends the data represented by an instance of this class to a BSONObjBuilder. | |
Public Member Functions inherited from mongo::WriteOperationBase | |
virtual void | setBulkIndex (size_t index) |
Sets the index of this WriteOperation in the context of a larger bulk operation. | |
virtual size_t | getBulkIndex () const |
The index of this WriteOperation in the context of a larger bulk operation. | |
|
virtual |
Appends a single document that describes the write operation represented by an instance of this class into the supplied BSONArrayBuilder.
This method will be called multiple times by a DBClientWriter in order to batch operations of the same type into a single command.
NOTE: The ultimate size of the of the command is bounded by the sever's maxBsonObjectSize.
Implements mongo::WriteOperation.
|
virtual |
Appends a document (or documents in the case of update) which describe the write operation represented by an instance of this class into the supplied BufBuilder.
This method may be called multiple times by a WireProtocolWriter in order to batch operations of the same type into a single wire protocol request.
NOTE: The size of this portion of the message is flexible but the size of the message itself is bounded by the server's maxMessageSizeBytes.
Implements mongo::WriteOperation.
|
virtual |
Appends the preamble for a write command into the supplied BSONObjBuilder.
Typically this involves a single bson element having a key that represents the operation type and a value which represents the collection to which the operation will be applied. This write op element must be the first element in the document according to the specification.
Implements mongo::WriteOperation.
|
virtual |
Appends the preamble for a wire protocol message into the supplied BufBuilder.
This is the part of the wire protocol message after the header but before the bson document portion. It typically contains the namespace, flags, and potentially space reserved by the protocol for future use.
NOTE: The size of the preamble is fixed but operation type dependant.
Implements mongo::WriteOperation.