20 #include "mongo/client/export_macros.h"
21 #include "mongo/util/net/operation.h"
54 bool hasErrors()
const;
62 bool hasWriteErrors()
const;
70 bool hasWriteConcernErrors()
const;
79 bool hasModifiedCount()
const;
91 int nInserted()
const;
98 int nUpserted()
const;
105 int nMatched()
const;
112 int nModified()
const;
119 int nRemoved()
const;
126 const std::vector<BSONObj>& upserted()
const;
136 const std::vector<BSONObj>& writeErrors()
const;
141 const std::vector<BSONObj>& writeConcernErrors()
const;
144 void _mergeWriteConcern(
const BSONObj& result);
145 void _mergeCommandResult(
const std::vector<WriteOperation*>& ops,
const BSONObj& result);
146 void _mergeGleResult(
const std::vector<WriteOperation*>& ops,
const BSONObj& result);
148 void _check(
bool throwSoftErrors);
149 void _setModified(
const BSONObj& result);
150 int _getIntOrDefault(
const BSONObj& obj,
const StringData& field,
const int defaultValue = 0);
152 int _createUpserts(
const BSONElement& upsert,
const std::vector<WriteOperation*>& ops);
153 void _createUpsert(
const BSONElement& upsert,
const std::vector<WriteOperation*>& ops);
154 void _createWriteError(
const BSONObj& error,
const std::vector<WriteOperation*>& ops);
155 void _createWriteConcernError(
const BSONObj& error);
163 std::vector<BSONObj> _upserted;
164 std::vector<BSONObj> _writeErrors;
165 std::vector<BSONObj> _writeConcernErrors;
167 bool _hasModifiedCount;
168 bool _requiresDetailedInsertResults;
A StringData object wraps a 'const string&' or a 'const char*' without copying its contents...
Definition: string_data.h:43
Utility functions for parsing numbers from strings.
Definition: compare_numbers.h:20
Class for constructing and executing bulk operations against MongoDB via a fluent API...
Definition: bulk_operation_builder.h:54
Class representing the result of a write operations sent to the server.
Definition: write_result.h:33
Definition: wire_protocol_writer.h:24
BSONElement represents an "element" in a BSONObj.
Definition: bsonelement.h:55
Definition: command_writer.h:24
abstract class that implements the core db operations
Definition: dbclientinterface.h:1422
C++ representation of a "BSON" object – that is, an extended JSON-style object in a binary represent...
Definition: bsonobj.h:78