diff options
author | Bernard Gorman <bernard.gorman@gmail.com> | 2021-03-24 14:07:04 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-04-02 21:51:14 +0000 |
commit | ea51edf33aa685e8b8d4692ee42b8c0e8e9cfb98 (patch) | |
tree | a3866340e9e80201eb9c9b675200700cc30ad53d /src/mongo/client | |
parent | 0198bcfb938ccd788f90a2f5e6156871cf18330f (diff) | |
download | mongo-ea51edf33aa685e8b8d4692ee42b8c0e8e9cfb98.tar.gz |
SERVER-54975 Rename IDL parser classes to use CommandRequest and CommandReply suffixes
Diffstat (limited to 'src/mongo/client')
-rw-r--r-- | src/mongo/client/dbclient_base.cpp | 4 | ||||
-rw-r--r-- | src/mongo/client/dbclient_cursor.cpp | 12 | ||||
-rw-r--r-- | src/mongo/client/dbclient_cursor.h | 7 |
3 files changed, 13 insertions, 10 deletions
diff --git a/src/mongo/client/dbclient_base.cpp b/src/mongo/client/dbclient_base.cpp index 96f057e118b..c085d260d53 100644 --- a/src/mongo/client/dbclient_base.cpp +++ b/src/mongo/client/dbclient_base.cpp @@ -963,8 +963,8 @@ void DBClientBase::update(const string& ns, } void DBClientBase::killCursor(const NamespaceString& ns, long long cursorId) { - runFireAndForgetCommand( - OpMsgRequest::fromDBAndBody(ns.db(), KillCursorsRequest(ns, {cursorId}).toBSON(BSONObj{}))); + runFireAndForgetCommand(OpMsgRequest::fromDBAndBody( + ns.db(), KillCursorsCommandRequest(ns, {cursorId}).toBSON(BSONObj{}))); } namespace { diff --git a/src/mongo/client/dbclient_cursor.cpp b/src/mongo/client/dbclient_cursor.cpp index b6b10ff5781..88bbb6ce478 100644 --- a/src/mongo/client/dbclient_cursor.cpp +++ b/src/mongo/client/dbclient_cursor.cpp @@ -136,16 +136,16 @@ Message DBClientCursor::_assembleInit() { // Legacy queries don't handle readOnce. findCommand.getValue()->setReadOnce(true); } - if (query.getBoolField(FindCommand::kRequestResumeTokenFieldName)) { + if (query.getBoolField(FindCommandRequest::kRequestResumeTokenFieldName)) { // Legacy queries don't handle requestResumeToken. findCommand.getValue()->setRequestResumeToken(true); } - if (query.hasField(FindCommand::kResumeAfterFieldName)) { + if (query.hasField(FindCommandRequest::kResumeAfterFieldName)) { // Legacy queries don't handle resumeAfter. findCommand.getValue()->setResumeAfter( - query.getObjectField(FindCommand::kResumeAfterFieldName)); + query.getObjectField(FindCommandRequest::kResumeAfterFieldName)); } - if (auto replTerm = query[FindCommand::kTermFieldName]) { + if (auto replTerm = query[FindCommandRequest::kTermFieldName]) { // Legacy queries don't handle term. findCommand.getValue()->setTerm(replTerm.numberLong()); } @@ -159,7 +159,7 @@ Message DBClientCursor::_assembleInit() { BSONObj cmd = findCommand.getValue()->toBSON(BSONObj()); if (auto readPref = query["$readPreference"]) { - // FindCommand doesn't handle $readPreference. + // FindCommandRequest doesn't handle $readPreference. cmd = BSONObjBuilder(std::move(cmd)).append(readPref).obj(); } return assembleCommandRequest(_client, ns.db(), opts, std::move(cmd)); @@ -599,7 +599,7 @@ DBClientCursor::DBClientCursor(DBClientBase* client, /* static */ StatusWith<std::unique_ptr<DBClientCursor>> DBClientCursor::fromAggregationRequest( - DBClientBase* client, AggregateCommand aggRequest, bool secondaryOk, bool useExhaust) { + DBClientBase* client, AggregateCommandRequest aggRequest, bool secondaryOk, bool useExhaust) { BSONObj ret; try { if (!client->runCommand(aggRequest.getNamespace().db().toString(), diff --git a/src/mongo/client/dbclient_cursor.h b/src/mongo/client/dbclient_cursor.h index b40474bbd6f..ff79874fb6e 100644 --- a/src/mongo/client/dbclient_cursor.h +++ b/src/mongo/client/dbclient_cursor.h @@ -41,7 +41,7 @@ namespace mongo { class AScopedConnection; class DBClientBase; -class AggregateCommand; +class AggregateCommandRequest; /** Queries return a cursor object */ class DBClientCursor { @@ -164,7 +164,10 @@ public: std::vector<BSONObj> initialBatch = {}); static StatusWith<std::unique_ptr<DBClientCursor>> fromAggregationRequest( - DBClientBase* client, AggregateCommand aggRequest, bool secondaryOk, bool useExhaust); + DBClientBase* client, + AggregateCommandRequest aggRequest, + bool secondaryOk, + bool useExhaust); virtual ~DBClientCursor(); |