summaryrefslogtreecommitdiff
path: root/src/mongo/client/connection_string.cpp
diff options
context:
space:
mode:
authorMatthew Saltz <matthew.saltz@mongodb.com>2018-06-07 14:35:58 -0400
committerMatthew Saltz <matthew.saltz@mongodb.com>2018-06-13 17:02:08 -0400
commit09919208ae16cd44f3ca3e98220e1cc322419a8a (patch)
treee0830b8d56407a2131f0b5e09bf489ea42d848e7 /src/mongo/client/connection_string.cpp
parent85477a157ab217912eec55422a9d7b2d0e7b0d47 (diff)
downloadmongo-09919208ae16cd44f3ca3e98220e1cc322419a8a.tar.gz
SERVER-35486 Create _addShard command on shard to drive shard initialization
Diffstat (limited to 'src/mongo/client/connection_string.cpp')
-rw-r--r--src/mongo/client/connection_string.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/client/connection_string.cpp b/src/mongo/client/connection_string.cpp
index 5e8a5f4e0bb..b4d4eed0a00 100644
--- a/src/mongo/client/connection_string.cpp
+++ b/src/mongo/client/connection_string.cpp
@@ -217,6 +217,10 @@ StatusWith<ConnectionString> ConnectionString::parse(const std::string& url) {
return Status(ErrorCodes::FailedToParse, str::stream() << "invalid url [" << url << "]");
}
+ConnectionString ConnectionString::deserialize(StringData url) {
+ return uassertStatusOK(parse(url.toString()));
+}
+
std::string ConnectionString::typeToString(ConnectionType type) {
switch (type) {
case INVALID: