summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops/modifier_pull_all.h
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 00:22:50 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 10:56:02 -0400
commit9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch)
tree3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/db/ops/modifier_pull_all.h
parent01965cf52bce6976637ecb8f4a622aeb05ab256a (diff)
downloadmongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/db/ops/modifier_pull_all.h')
-rw-r--r--src/mongo/db/ops/modifier_pull_all.h64
1 files changed, 29 insertions, 35 deletions
diff --git a/src/mongo/db/ops/modifier_pull_all.h b/src/mongo/db/ops/modifier_pull_all.h
index fef6c7b03f3..9f7efb8ac8d 100644
--- a/src/mongo/db/ops/modifier_pull_all.h
+++ b/src/mongo/db/ops/modifier_pull_all.h
@@ -38,50 +38,44 @@
namespace mongo {
- class LogBuilder;
+class LogBuilder;
- class ModifierPullAll : public ModifierInterface {
- MONGO_DISALLOW_COPYING(ModifierPullAll);
+class ModifierPullAll : public ModifierInterface {
+ MONGO_DISALLOW_COPYING(ModifierPullAll);
- public:
+public:
+ ModifierPullAll();
+ virtual ~ModifierPullAll();
- ModifierPullAll();
- virtual ~ModifierPullAll();
+ /**
+ * The modifier $pullAll takes an array of values to match literally, and remove
+ *
+ * Ex. {$pullAll : {<field> : [<values>]}}
+ * {$pullAll :{ array : [1,2] } } will transform {array: [1,2,3]} -> {array: [3]}
+ */
+ virtual Status init(const BSONElement& modExpr, const Options& opts, bool* positional = NULL);
- /**
- * The modifier $pullAll takes an array of values to match literally, and remove
- *
- * Ex. {$pullAll : {<field> : [<values>]}}
- * {$pullAll :{ array : [1,2] } } will transform {array: [1,2,3]} -> {array: [3]}
- */
- virtual Status init(const BSONElement& modExpr, const Options& opts,
- bool* positional = NULL);
+ virtual Status prepare(mutablebson::Element root, StringData matchedField, ExecInfo* execInfo);
- virtual Status prepare(mutablebson::Element root,
- StringData matchedField,
- ExecInfo* execInfo);
+ virtual Status apply() const;
- virtual Status apply() const;
+ virtual Status log(LogBuilder* logBuilder) const;
- virtual Status log(LogBuilder* logBuilder) const;
+private:
+ // Access to each component of fieldName that's the target of this mod.
+ FieldRef _fieldRef;
- private:
+ // 0 or index for $-positional in _fieldRef.
+ size_t _positionalPathIndex;
- // Access to each component of fieldName that's the target of this mod.
- FieldRef _fieldRef;
+ // The instance of the field in the provided doc.
+ // This data is valid after prepare, for use by log and apply
+ struct PreparedState;
+ std::unique_ptr<PreparedState> _preparedState;
- // 0 or index for $-positional in _fieldRef.
- size_t _positionalPathIndex;
+ // User specified elements to remove
+ std::vector<BSONElement> _elementsToFind;
+};
- // The instance of the field in the provided doc.
- // This data is valid after prepare, for use by log and apply
- struct PreparedState;
- std::unique_ptr<PreparedState> _preparedState;
-
- // User specified elements to remove
- std::vector<BSONElement> _elementsToFind;
-
- };
-
-} // namespace mongo
+} // namespace mongo