diff options
Diffstat (limited to 'src/mongo/s/shard_key_pattern.h')
-rw-r--r-- | src/mongo/s/shard_key_pattern.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/s/shard_key_pattern.h b/src/mongo/s/shard_key_pattern.h index a9672f65ee7..ca5baac3ec3 100644 --- a/src/mongo/s/shard_key_pattern.h +++ b/src/mongo/s/shard_key_pattern.h @@ -124,6 +124,12 @@ public: std::string toString() const; /** + * Converts the passed in key pattern into a KeyString. + * Note: this function strips the field names when creating the KeyString. + */ + static std::string toKeyString(const BSONObj& shardKey); + + /** * Returns true if the provided document is a shard key - i.e. has the same fields as the * shard key pattern and valid shard key values. */ |