diff options
author | Nathan Myers <ncm@cantrip.org> | 2017-08-11 10:59:20 -0400 |
---|---|---|
committer | Nathan Myers <nathan.myers@10gen.com> | 2017-08-15 16:57:35 -0400 |
commit | d618d0349b807108d4eb8b36feaaa81d59350038 (patch) | |
tree | e48f114e2a8a438b214c05780d3b03b12df93ed3 /src/mongo/s/shard_key_pattern.h | |
parent | 13b5a981c0118704c91881669444ae66d0261878 (diff) | |
download | mongo-d618d0349b807108d4eb8b36feaaa81d59350038.tar.gz |
SERVER-29136 Better extractDocumentKey
Diffstat (limited to 'src/mongo/s/shard_key_pattern.h')
-rw-r--r-- | src/mongo/s/shard_key_pattern.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/s/shard_key_pattern.h b/src/mongo/s/shard_key_pattern.h index 6b31d8e5dd5..1ceed1a8147 100644 --- a/src/mongo/s/shard_key_pattern.h +++ b/src/mongo/s/shard_key_pattern.h @@ -225,11 +225,20 @@ public: */ BoundList flattenBounds(const IndexBounds& indexBounds) const; + /** + * Returns true if the key pattern has an "_id" field of any flavor. + */ + bool hasId() const { + return _hasId; + }; + private: // Ordered, parsed paths std::vector<std::unique_ptr<FieldRef>> _keyPatternPaths; KeyPattern _keyPattern; + + bool _hasId; }; } // namespace mongo |