diff options
author | Justin Seyster <justin.seyster@mongodb.com> | 2017-06-29 18:27:31 -0400 |
---|---|---|
committer | Justin Seyster <justin.seyster@mongodb.com> | 2017-06-29 18:27:31 -0400 |
commit | 9f87524ee33bc2ac0f4dd47b4e0aec81f744f014 (patch) | |
tree | 36925b6511f8af24d74d73bd1473b17c9a9b5912 /src/mongo/db/update/modifier_table.h | |
parent | f37ca39a93b5344992384392b3e57eed9c4cd1b0 (diff) | |
download | mongo-9f87524ee33bc2ac0f4dd47b4e0aec81f744f014.tar.gz |
SERVER-28774 Add RenameNode.
A $rename is implemented with two UpdateLeafNode classes: RenameNode and
ConflictPlaceholderNode. The ConflictPlaceHolder node exists only to
mark the source path of the rename in the update tree, so that it
generates a conflict if another modifier tries to act on the same
path.
Actually writing the destination path and unsetting the source path
occurs in RenameNode apply method.
The RenameNode gets placed in the update tree according to its
destination path, so that when we reach the RenameNode apply method,
pathTaken and pathToCreate are with respect to the destination path,
allowing us to create the path if we need to.
Diffstat (limited to 'src/mongo/db/update/modifier_table.h')
-rw-r--r-- | src/mongo/db/update/modifier_table.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/update/modifier_table.h b/src/mongo/db/update/modifier_table.h index ad5262fb1b0..515ceb89cd2 100644 --- a/src/mongo/db/update/modifier_table.h +++ b/src/mongo/db/update/modifier_table.h @@ -52,6 +52,7 @@ enum ModifierType { MOD_SET_ON_INSERT, MOD_RENAME, MOD_UNSET, + MOD_CONFLICT_PLACEHOLDER, MOD_UNKNOWN }; |