summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/field_path.h
diff options
context:
space:
mode:
authorAnton Korshunov <anton.korshunov@mongodb.com>2019-08-23 12:37:37 +0000
committerevergreen <evergreen@mongodb.com>2019-08-23 12:37:37 +0000
commitaea948bf0f6c85b385f24f6c5de725b5c3c1335b (patch)
treefcc8fa3387b881a4e96e21331221e36c77a73e95 /src/mongo/db/pipeline/field_path.h
parent6a2c556dfaed34e641b64469d1de34dc88d36ec9 (diff)
downloadmongo-aea948bf0f6c85b385f24f6c5de725b5c3c1335b.tar.gz
SERVER-41964 find() execution code
Diffstat (limited to 'src/mongo/db/pipeline/field_path.h')
-rw-r--r--src/mongo/db/pipeline/field_path.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/field_path.h b/src/mongo/db/pipeline/field_path.h
index 008afc4c2ea..eed423d60d6 100644
--- a/src/mongo/db/pipeline/field_path.h
+++ b/src/mongo/db/pipeline/field_path.h
@@ -86,6 +86,13 @@ public:
}
/**
+ * Return the first path component.
+ */
+ StringData front() const {
+ return getFieldName(0);
+ }
+
+ /**
* Return the last path component.
*/
StringData back() const {