summaryrefslogtreecommitdiff
path: root/src/mongo/shell/query.js
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
commit4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch)
tree1682a647d4463397c119183369ae6f750d5fdcff /src/mongo/shell/query.js
parentaa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff)
parent8f0827553e09872941945a093b647a4211a9db7f (diff)
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0' with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'src/mongo/shell/query.js')
-rw-r--r--src/mongo/shell/query.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mongo/shell/query.js b/src/mongo/shell/query.js
index b43e13c23e8..a5d920cb109 100644
--- a/src/mongo/shell/query.js
+++ b/src/mongo/shell/query.js
@@ -98,10 +98,6 @@ DBQuery.prototype._canUseCommandCursor = function() {
(this._options & DBQuery.Option.exhaust) === 0;
};
-DBQuery.prototype._isTailableCursor = function() {
- return (this._options & DBQuery.Option.tailable) !== 0;
-};
-
/**
* This method is exposed only for the purpose of testing and should not be used in most contexts.
*
@@ -305,9 +301,7 @@ DBQuery.prototype.skip = function(skip) {
DBQuery.prototype.hasNext = function() {
this._exec();
- // Return when limit is reached for tailable cursors. For other cursor options, like an exhaust
- // cursor, the server manages closing.
- if (this._isTailableCursor() && this._limit > 0 && this._cursorSeen >= this._limit) {
+ if (this._limit > 0 && this._cursorSeen >= this._limit) {
this._cursor.close();
return false;
}