21#include "mongo/bson/bsonobjbuilder.h"
22#include "mongo/util/net/operation.h"
Definition bsonobjbuilder.h:748
Utility for creating a BSONObj.
Definition bsonobjbuilder.h:53
Represents a single server side write operation and encapsulates the process for encoding the operati...
Definition write_operation.h:31
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 startCommand(const std::string &ns, BSONObjBuilder *command) const =0
Appends the preamble for a write command into the supplied BSONObjBuilder.
virtual void appendSelfToBSONObj(BSONObjBuilder *obj) const =0
Appends the data represented by an instance of this class to a BSONObjBuilder.
virtual const char * batchName() const =0
Returns the name for a batch of this type of write operation.
virtual WriteOpType operationType() const =0
Returns the MongoDB wire protocol operation type represented by an instance of this particular write ...
virtual void setBulkIndex(size_t index)=0
Sets the index of this WriteOperation in the context of a larger bulk operation.
virtual void appendSelfToRequest(BufBuilder *builder) const =0
Appends a document (or documents in the case of update) which describe the write operation represente...
virtual int incrementalSize() const =0
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 =0
Appends the preamble for a wire protocol message into the supplied BufBuilder.
virtual size_t getBulkIndex() const =0
The index of this WriteOperation in the context of a larger bulk operation.
the main MongoDB namespace
Definition bulk_operation_builder.h:24