summaryrefslogtreecommitdiff
path: root/src/mongo/client/dbclient_base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/client/dbclient_base.cpp')
-rw-r--r--src/mongo/client/dbclient_base.cpp61
1 files changed, 1 insertions, 60 deletions
diff --git a/src/mongo/client/dbclient_base.cpp b/src/mongo/client/dbclient_base.cpp
index 5c2238ebec9..2c2bcf36412 100644
--- a/src/mongo/client/dbclient_base.cpp
+++ b/src/mongo/client/dbclient_base.cpp
@@ -584,31 +584,6 @@ bool DBClientBase::exists(const string& ns) {
const uint64_t DBClientBase::INVALID_SOCK_CREATION_TIME = std::numeric_limits<uint64_t>::max();
-unique_ptr<DBClientCursor> DBClientBase::query_DEPRECATED(
- const NamespaceStringOrUUID& nsOrUuid,
- const BSONObj& filter,
- const client_deprecated::Query& querySettings,
- int limit,
- int nToSkip,
- const BSONObj* fieldsToReturn,
- int queryOptions,
- int batchSize,
- boost::optional<BSONObj> readConcernObj) {
- unique_ptr<DBClientCursor> c(new DBClientCursor(this,
- nsOrUuid,
- filter,
- querySettings,
- limit,
- nToSkip,
- fieldsToReturn,
- queryOptions,
- batchSize,
- readConcernObj));
- if (c->init())
- return c;
- return nullptr;
-}
-
std::unique_ptr<DBClientCursor> DBClientBase::find(FindCommandRequest findRequest,
const ReadPreferenceSetting& readPref,
ExhaustMode exhaustMode) {
@@ -651,46 +626,12 @@ BSONObj DBClientBase::findOne(const NamespaceStringOrUUID& nssOrUuid, BSONObj fi
unique_ptr<DBClientCursor> DBClientBase::getMore(const string& ns, long long cursorId) {
unique_ptr<DBClientCursor> c(
- new DBClientCursor(this, NamespaceString(ns), cursorId, 0 /* limit */, 0 /* options */));
+ new DBClientCursor(this, NamespaceString(ns), cursorId, false /*isExhaust*/));
if (c->init())
return c;
return nullptr;
}
-unsigned long long DBClientBase::query_DEPRECATED(
- std::function<void(DBClientCursorBatchIterator&)> f,
- const NamespaceStringOrUUID& nsOrUuid,
- const BSONObj& filter,
- const client_deprecated::Query& querySettings,
- const BSONObj* fieldsToReturn,
- int queryOptions,
- int batchSize,
- boost::optional<BSONObj> readConcernObj) {
- // mask options
- queryOptions &= (int)(QueryOption_NoCursorTimeout | QueryOption_SecondaryOk);
-
- unique_ptr<DBClientCursor> c(this->query_DEPRECATED(nsOrUuid,
- filter,
- querySettings,
- 0,
- 0,
- fieldsToReturn,
- queryOptions,
- batchSize,
- readConcernObj));
- // query_DEPRECATED() throws on network error so OK to uassert with numeric code here.
- uassert(16090, "socket error for mapping query", c.get());
-
- unsigned long long n = 0;
-
- while (c->more()) {
- DBClientCursorBatchIterator i(*c);
- f(i);
- n += i.n();
- }
- return n;
-}
-
namespace {
OpMsgRequest createInsertRequest(const string& ns,
const vector<BSONObj>& v,