summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/projection_ast.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query/projection_ast.h')
-rw-r--r--src/mongo/db/query/projection_ast.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mongo/db/query/projection_ast.h b/src/mongo/db/query/projection_ast.h
index 3f85c85c419..3f68b7ff34c 100644
--- a/src/mongo/db/query/projection_ast.h
+++ b/src/mongo/db/query/projection_ast.h
@@ -98,6 +98,22 @@ protected:
ASTNodeVector _children;
};
+inline auto begin(ASTNode& node) {
+ return node.children().begin();
+}
+
+inline auto begin(const ASTNode& node) {
+ return node.children().begin();
+}
+
+inline auto end(ASTNode& node) {
+ return node.children().end();
+}
+
+inline auto end(const ASTNode& node) {
+ return node.children().end();
+}
+
class MatchExpressionASTNode final : public ASTNode {
public:
MatchExpressionASTNode(CopyableMatchExpression matchExpr) : _matchExpr{matchExpr} {}