Create the interface UpdateNode and subclasses UpdateObjectNode and UpdateLeafNode, and its subclass UpdateSetNode. Implement a function
Status UpdateObjectNode::parseAndMerge(modifiertable::ModifierType type, BSONElement modExpr, bool fromReplication, CollatorInterface* collator, bool* positional)
parseAndMerge() should parse modExpr as an update modifier and merge it with the UpdateObjectNode. This will be plugged into UpdateDriver::addAndParse().
Parsing should fail if:
- type is not MOD_SET (for now).
- The field path in modExpr is not updatable.
- The field path in modExpr contains multiple positional ($) elements, e.g. {$set: {"a.$.$": 5}}.
- A leaf node fails to parse the value, e.g. {$inc: {a: "bad"}}.
- A conflict is detected, i.e. we try to create an UpdateObjectNode and an UpdateLeafNode in the same position in the try, or we try to create two UpdateLeafNodes in the same position in the tree.
Implement UpdateNode::setCollator().
- is depended on by
-
SERVER-28758 Implement UpdateNode::mergeTrees()
- Closed
-
SERVER-28759 Implement SetNode::apply()
- Closed
-
SERVER-28764 Create AddToSetNode
- Closed
-
SERVER-28765 Create BitNode
- Closed
-
SERVER-28766 Create CurrentDateNode
- Closed
-
SERVER-28767 Create IncNode/MulNode
- Closed
-
SERVER-28768 Create MaxNode/MinNode
- Closed
-
SERVER-28769 Create PopNode
- Closed
-
SERVER-28770 Create PullNode
- Closed
-
SERVER-28771 Create PullAllNode
- Closed
-
SERVER-28772 Create PushNode/PushAllNode
- Closed
-
SERVER-28773 Create SetOnInsertNode
- Closed
-
SERVER-28774 Create RenameNode
- Closed
-
SERVER-28776 Create an alternative to ModifierObjectReplace that does not implement ModifierInterface
- Closed