diff options
author | Anton Korshunov <anton.korshunov@mongodb.com> | 2019-11-15 10:19:14 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-11-15 10:19:14 +0000 |
commit | 73b456d5c059b17d1c7f0f8badb7c72391ee2173 (patch) | |
tree | 89451cae5a7cfbedb3a2faccd307bc870f7b0a40 /src/mongo/db/query/projection_policies.h | |
parent | cc3f2c8ba06e9e8c248a0d91a9efd5351311ca37 (diff) | |
download | mongo-73b456d5c059b17d1c7f0f8badb7c72391ee2173.tar.gz |
SERVER-43291 Consolidate projection execution interfaces
Diffstat (limited to 'src/mongo/db/query/projection_policies.h')
-rw-r--r-- | src/mongo/db/query/projection_policies.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/mongo/db/query/projection_policies.h b/src/mongo/db/query/projection_policies.h index 4d2d6a54fba..09094227c86 100644 --- a/src/mongo/db/query/projection_policies.h +++ b/src/mongo/db/query/projection_policies.h @@ -64,18 +64,24 @@ struct ProjectionPolicies { FindOnlyFeaturesPolicy::kBanFindOnlyFeatures; static ProjectionPolicies findProjectionPolicies() { - return ProjectionPolicies{ - ProjectionPolicies::kDefaultIdPolicyDefault, - ProjectionPolicies::kArrayRecursionPolicyDefault, - ProjectionPolicies::kComputedFieldsPolicyDefault, - ProjectionPolicies::FindOnlyFeaturesPolicy::kAllowFindOnlyFeatures}; + return ProjectionPolicies{kDefaultIdPolicyDefault, + kArrayRecursionPolicyDefault, + kComputedFieldsPolicyDefault, + FindOnlyFeaturesPolicy::kAllowFindOnlyFeatures}; } static ProjectionPolicies aggregateProjectionPolicies() { - return ProjectionPolicies{ProjectionPolicies::kDefaultIdPolicyDefault, - ProjectionPolicies::kArrayRecursionPolicyDefault, - ProjectionPolicies::kComputedFieldsPolicyDefault, - ProjectionPolicies::FindOnlyFeaturesPolicy::kBanFindOnlyFeatures}; + return ProjectionPolicies{kDefaultIdPolicyDefault, + kArrayRecursionPolicyDefault, + kComputedFieldsPolicyDefault, + FindOnlyFeaturesPolicy::kBanFindOnlyFeatures}; + } + + static ProjectionPolicies wildcardIndexSpecProjectionPolicies() { + return ProjectionPolicies{DefaultIdPolicy::kExcludeId, + ArrayRecursionPolicy::kDoNotRecurseNestedArrays, + ComputedFieldsPolicy::kBanComputedFields, + FindOnlyFeaturesPolicy::kBanFindOnlyFeatures}; } ProjectionPolicies( |