diff options
Diffstat (limited to 'src/mongo/db/namespace_string.cpp')
| -rw-r--r-- | src/mongo/db/namespace_string.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/namespace_string.cpp b/src/mongo/db/namespace_string.cpp index 52e3b5a9717..374fe4e5795 100644 --- a/src/mongo/db/namespace_string.cpp +++ b/src/mongo/db/namespace_string.cpp @@ -35,6 +35,7 @@ #include "mongo/base/parse_number.h" #include "mongo/base/status.h" +#include "mongo/db/query/query_shape/serialization_options.h" #include "mongo/db/server_options.h" #include "mongo/util/str.h" @@ -278,6 +279,10 @@ std::string NamespaceString::getSisterNS(StringData local) const { return db().toString() + "." + local.toString(); } +std::string NamespaceString::toString(const SerializationOptions& opts) const { + return opts.serializeIdentifier(ns()); +} + void NamespaceString::serializeCollectionName(BSONObjBuilder* builder, StringData fieldName) const { if (isCollectionlessAggregateNS()) { builder->append(fieldName, 1); |
