diff options
author | samontea <merciers.merciers@gmail.com> | 2020-12-07 17:05:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-12-07 22:06:53 +0000 |
commit | c2deb97265c1b19a193ecdb58be1197bdbbd630f (patch) | |
tree | c488feb093bc2e49f6446d77ba6e010d433cc6b9 /src/mongo/db/pipeline/lite_parsed_pipeline.h | |
parent | 957ddd678dbd49a96318a13e8f669567e4eba3ab (diff) | |
download | mongo-c2deb97265c1b19a193ecdb58be1197bdbbd630f.tar.gz |
SERVER-35479 Make $collStats count behavior have "standard" error code and consistent behavior across topologies
Diffstat (limited to 'src/mongo/db/pipeline/lite_parsed_pipeline.h')
-rw-r--r-- | src/mongo/db/pipeline/lite_parsed_pipeline.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/lite_parsed_pipeline.h b/src/mongo/db/pipeline/lite_parsed_pipeline.h index d80a470c9b0..0af48f8b74f 100644 --- a/src/mongo/db/pipeline/lite_parsed_pipeline.h +++ b/src/mongo/db/pipeline/lite_parsed_pipeline.h @@ -97,6 +97,13 @@ public: } /** + * Returns true if the pipeline begins with a $collStats stage with the count option. + */ + bool startsWithCollStatsWithCount() const { + return startsWithCollStats() && _stageSpecs.front()->isCollStatsWithCount(); + } + + /** * Returns true if the pipeline has a $changeStream stage. */ bool hasChangeStream() const { |