summaryrefslogtreecommitdiff
path: root/src/mongo/db/update/path_support.h
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2017-06-27 13:06:18 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2017-06-30 17:10:38 -0400
commit07baac065147381842a172726a5f80d7e57a6ef8 (patch)
treef358a00798025d4b848ddb5231ccd2974e3db501 /src/mongo/db/update/path_support.h
parentacc6b704793fc37d5439b32b64a186a500436a36 (diff)
downloadmongo-07baac065147381842a172726a5f80d7e57a6ef8.tar.gz
SERVER-29162 UpdateNode implementation should only validate modified fields
Diffstat (limited to 'src/mongo/db/update/path_support.h')
-rw-r--r--src/mongo/db/update/path_support.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/update/path_support.h b/src/mongo/db/update/path_support.h
index 69106ea5010..a27be4b93f6 100644
--- a/src/mongo/db/update/path_support.h
+++ b/src/mongo/db/update/path_support.h
@@ -86,18 +86,18 @@ Status findLongestPrefix(const FieldRef& prefix,
mutablebson::Element* elemFound);
/**
- * Creates the parts 'prefix[idxRoot]', 'prefix[idxRoot+1]', ...,
- * 'prefix[<numParts>-1]' under 'elemFound' and adds 'newElem' as a child of that
- * path. Returns OK, if successful, or an error code describing why not, otherwise.
+ * Creates the parts 'prefix[idxRoot]', 'prefix[idxRoot+1]', ..., 'prefix[<numParts>-1]' under
+ * 'elemFound' and adds 'newElem' as a child of that path. Returns the first element that was
+ * created along the path, if successful, or an error code describing why not, otherwise.
*
* createPathAt is designed to work with 'findLongestPrefix' in that it can create the
* field parts in 'prefix' that are missing from a given document. 'elemFound' points
* to the element in the doc that is the parent of prefix[idxRoot].
*/
-Status createPathAt(const FieldRef& prefix,
- size_t idxRoot,
- mutablebson::Element elemFound,
- mutablebson::Element newElem);
+StatusWith<mutablebson::Element> createPathAt(const FieldRef& prefix,
+ size_t idxRoot,
+ mutablebson::Element elemFound,
+ mutablebson::Element newElem);
/**
* Uses the above methods to set the given value at the specified path in a mutable