summaryrefslogtreecommitdiff
path: root/src/mongo/db/namespace_string.cpp
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-18 17:02:53 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-18 17:02:53 -0300
commit959575a5ca598bf5f37fb5cebe7ed1d80d3d71f7 (patch)
treeacc8d60aedb12b70048e676e8a7349deb0010db8 /src/mongo/db/namespace_string.cpp
parent76588293975fc059cf076779e4283e6ffaf8afff (diff)
New upstream version 6.0.20upstream
Diffstat (limited to 'src/mongo/db/namespace_string.cpp')
-rw-r--r--src/mongo/db/namespace_string.cpp5
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);