diff options
Diffstat (limited to 'src/mongo/db/update/bit_node.h')
-rw-r--r-- | src/mongo/db/update/bit_node.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mongo/db/update/bit_node.h b/src/mongo/db/update/bit_node.h index 3edc84179a7..2f23d9a53df 100644 --- a/src/mongo/db/update/bit_node.h +++ b/src/mongo/db/update/bit_node.h @@ -28,7 +28,7 @@ #pragma once -#include "mongo/db/update/path_creating_node.h" +#include "mongo/db/update/modifier_node.h" #include "mongo/stdx/memory.h" namespace mongo { @@ -36,7 +36,7 @@ namespace mongo { /** * Represents the application of a $bit to the value at the end of a path. */ -class BitNode : public PathCreatingNode { +class BitNode : public ModifierNode { public: Status init(BSONElement modExpr, const CollatorInterface* collator) final; @@ -47,11 +47,14 @@ public: void setCollator(const CollatorInterface* collator) final {} protected: - UpdateExistingElementResult updateExistingElement(mutablebson::Element* element, - std::shared_ptr<FieldRef> elementPath, - LogBuilder* logBuilder) const final; + ModifyResult updateExistingElement(mutablebson::Element* element, + std::shared_ptr<FieldRef> elementPath) const final; void setValueForNewElement(mutablebson::Element* element) const final; + bool allowCreation() const final { + return true; + } + private: /** * Applies each op in "_opList" to "value" and returns the result. |