diff options
author | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2020-08-20 13:00:50 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-20 18:12:14 +0000 |
commit | d3064df927c97abd402ee5768ab57667ed6849c9 (patch) | |
tree | c246336371b545bdc5942dab73aef5c094d99bd4 /src/mongo/shell/mongo_main.cpp | |
parent | 526230bafa6e5a49f5783507734fba93486c19ae (diff) | |
download | mongo-d3064df927c97abd402ee5768ab57667ed6849c9.tar.gz |
SERVER-49380 Add API params to mongo shell
Diffstat (limited to 'src/mongo/shell/mongo_main.cpp')
-rw-r--r-- | src/mongo/shell/mongo_main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/shell/mongo_main.cpp b/src/mongo/shell/mongo_main.cpp index 3343a61075c..ecdca584ab1 100644 --- a/src/mongo/shell/mongo_main.cpp +++ b/src/mongo/shell/mongo_main.cpp @@ -818,7 +818,8 @@ int mongo_main(int argc, char* argv[]) { ss << "__quiet = true;" << std::endl; } - ss << "db = connect( \"" << parsedURI.canonicalizeURIAsString() << "\");" << std::endl; + ss << "db = connect( \"" << parsedURI.canonicalizeURIAsString() + << "\", null, null, {api: " << getApiParametersJSON() << "});" << std::endl; if (shellGlobalParams.shouldRetryWrites || parsedURI.getRetryWrites()) { // If the --retryWrites cmdline argument or retryWrites URI param was specified, |