diff options
author | Nick Zolnierz <nicholas.zolnierz@mongodb.com> | 2018-11-02 09:34:19 -0400 |
---|---|---|
committer | Nick Zolnierz <nicholas.zolnierz@mongodb.com> | 2018-11-30 12:18:35 -0500 |
commit | c60c435ffd0bece5000d66cd5ada876717c89827 (patch) | |
tree | 8c081eff780ed6d56ff39731a626b7d65da9b03a /src/mongo/db/update/update_node_test_fixture.h | |
parent | f3acfdec219b7a9122b4954a269c89e3604416d2 (diff) | |
download | mongo-c60c435ffd0bece5000d66cd5ada876717c89827.tar.gz |
SERVER-31012: expose optional way of retrieving FieldRef's for fields that were modified by an update
Diffstat (limited to 'src/mongo/db/update/update_node_test_fixture.h')
-rw-r--r-- | src/mongo/db/update/update_node_test_fixture.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/update/update_node_test_fixture.h b/src/mongo/db/update/update_node_test_fixture.h index f578bde73b8..635ccb5b300 100644 --- a/src/mongo/db/update/update_node_test_fixture.h +++ b/src/mongo/db/update/update_node_test_fixture.h @@ -64,6 +64,7 @@ protected: _indexData.reset(); _logDoc.reset(); _logBuilder = stdx::make_unique<LogBuilder>(_logDoc.root()); + _modifiedPaths.clear(); } UpdateNode::ApplyParams getApplyParams(mutablebson::Element element) { @@ -76,6 +77,7 @@ protected: applyParams.validateForStorage = _validateForStorage; applyParams.indexData = _indexData.get(); applyParams.logBuilder = _logBuilder.get(); + applyParams.modifiedPaths = &_modifiedPaths; return applyParams; } @@ -126,6 +128,10 @@ protected: return _logDoc; } + std::string getModifiedPaths() { + return _modifiedPaths.toString(); + } + private: std::vector<std::unique_ptr<FieldRef>> _immutablePathsVector; FieldRefSet _immutablePaths; @@ -138,6 +144,7 @@ private: std::unique_ptr<UpdateIndexData> _indexData; mutablebson::Document _logDoc; std::unique_ptr<LogBuilder> _logBuilder; + FieldRefSetWithStorage _modifiedPaths; }; } // namespace mongo |