summaryrefslogtreecommitdiff
path: root/src/mongo/db/field_ref.h
diff options
context:
space:
mode:
authorNick Zolnierz <nicholas.zolnierz@mongodb.com>2019-02-01 09:57:25 -0500
committerNick Zolnierz <nicholas.zolnierz@mongodb.com>2019-02-06 12:02:38 -0500
commitbe3ae4bc7b5c6792084251065959b97f52519db9 (patch)
treefd92af71ffb2a46c3cc9b6dbd81b809135bd8289 /src/mongo/db/field_ref.h
parent0b1c1f570bd5b916ef0661e376dfe4d27387d3c8 (diff)
downloadmongo-be3ae4bc7b5c6792084251065959b97f52519db9.tar.gz
SERVER-39223 Move JSON Schema keywords to header
Diffstat (limited to 'src/mongo/db/field_ref.h')
-rw-r--r--src/mongo/db/field_ref.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/field_ref.h b/src/mongo/db/field_ref.h
index 4ae903d35d2..4b9b1b6a235 100644
--- a/src/mongo/db/field_ref.h
+++ b/src/mongo/db/field_ref.h
@@ -178,6 +178,10 @@ public:
return numParts() == 0;
}
+ StringData operator[](int index) const {
+ return getPart(index);
+ }
+
private:
// Dotted fields are most often not longer than four parts. We use a mixed structure
// here that will not require any extra memory allocation when that is the case. And