summaryrefslogtreecommitdiff
path: root/src/mongo/db/field_ref.h
diff options
context:
space:
mode:
authorTed Tuckman <ted.tuckman@mongodb.com>2019-05-08 11:12:49 -0400
committerTed Tuckman <ted.tuckman@mongodb.com>2019-05-28 17:43:57 -0400
commit530167637e22f2cff3ddd8551f3229db6ed97824 (patch)
tree3c42daa85a74c951fd5d63e03cf7ded1cc867827 /src/mongo/db/field_ref.h
parentfc6edc2f454ae29b1daaa0f2547b8204aa27bf72 (diff)
downloadmongo-530167637e22f2cff3ddd8551f3229db6ed97824.tar.gz
SERVER-40826 Add getters to projection nodes
Diffstat (limited to 'src/mongo/db/field_ref.h')
-rw-r--r--src/mongo/db/field_ref.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/field_ref.h b/src/mongo/db/field_ref.h
index 736f843ec34..2fe3a7f375f 100644
--- a/src/mongo/db/field_ref.h
+++ b/src/mongo/db/field_ref.h
@@ -115,6 +115,12 @@ public:
void removeLastPart();
/**
+ * Removes the first part from the path, decreasing its size by 1. Has no effect on a FielRef
+ * with size 0.
+ */
+ void removeFirstPart();
+
+ /**
* Returns the 'i-th' field part. Assumes i < size(). Behavior is undefined otherwise.
*/
StringData getPart(size_t i) const;