21 #include "mongo/bson/bsonobjbuilder.h"
22 #include "mongo/util/net/operation.h"
44 virtual const char*
batchName()
const = 0;
Represents a single server side write operation and encapsulates the process for encoding the operati...
Definition: write_operation.h:31
virtual int incrementalSize() const =0
Returns the incremental size (in bytes) required to add this write operation to a batch...
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
virtual void startCommand(const std::string &ns, BSONObjBuilder *command) const =0
Appends the preamble for a write command into the supplied BSONObjBuilder.
virtual void startRequest(const std::string &ns, bool ordered, BufBuilder *builder) const =0
Appends the preamble for a wire protocol message into the supplied BufBuilder.
virtual void setBulkIndex(size_t index)=0
Sets the index of this WriteOperation in the context of a larger bulk operation.
Utility for creating a BSONObj.
Definition: bsonobjbuilder.h:53
virtual void appendSelfToCommand(BSONArrayBuilder *batch) const =0
Appends a single document that describes the write operation represented by an instance of this class...
virtual void appendSelfToRequest(BufBuilder *builder) const =0
Appends a document (or documents in the case of update) which describe the write operation represente...
virtual const char * batchName() const =0
Returns the name for a batch of this type of write operation.
Definition: bsonobjbuilder.h:765
virtual void appendSelfToBSONObj(BSONObjBuilder *obj) const =0
Appends the data represented by an instance of this class to a BSONObjBuilder.
virtual size_t getBulkIndex() const =0
The index of this WriteOperation in the context of a larger bulk operation.
virtual WriteOpType operationType() const =0
Returns the MongoDB wire protocol operation type represented by an instance of this particular write ...