You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -143,10 +145,10 @@ public DBCursor addSpecial( String name , Object o ){
143
145
publicDBCursorhint( DBObjectindexKeys ){
144
146
if ( _it != null )
145
147
thrownewIllegalStateException( "can't hint after executing query" );
146
-
148
+
147
149
if ( indexKeys == null )
148
150
_hint = null;
149
-
else
151
+
else
150
152
_hint = DBCollection.genIndexName( indexKeys );
151
153
returnthis;
152
154
}
@@ -165,9 +167,9 @@ public DBCursor hint( String indexName ){
165
167
}
166
168
167
169
/**
168
-
* Use snapshot mode for the query. Snapshot mode assures no duplicates are
169
-
* returned, or objects missed, which were present at both the start and end
170
-
* of the query's execution (if an object is new during the query, or deleted
170
+
* Use snapshot mode for the query. Snapshot mode assures no duplicates are
171
+
* returned, or objects missed, which were present at both the start and end
172
+
* of the query's execution (if an object is new during the query, or deleted
171
173
* during the query, it may or may not be returned, even with snapshot mode).
172
174
* Note that short query responses (less than 1MB) are always effectively snapshotted.
173
175
* Currently, snapshot mode may not be used with sorting or explicit hints.
@@ -226,14 +228,14 @@ else if (n < 0)
226
228
/**
227
229
* Limits the number of elements returned in one batch.
228
230
* A cursor typically fetches a batch of result objects and store them locally.
229
-
*
231
+
*
230
232
* If <tt>batchSize</tt> is positive, it represents the size of each batch of objects retrieved.
231
233
* It can be adjusted to optimize performance and limit data transfer.
232
-
*
234
+
*
233
235
* If <tt>batchSize</tt> is negative, it will limit of number objects returned, that fit within the max batch size limit (usually 4MB), and cursor will be closed.
234
236
* For example if <tt>batchSize</tt> is -10, then the server will return a maximum of 10 documents and as many as can fit in 4MB, then close the cursor.
235
237
* Note that this feature is different from limit() in that documents must fit within a maximum size, and it removes the need to send a request to close the cursor server-side.
236
-
*
238
+
*
237
239
* The batch size can be changed even after a cursor is iterated, in which case the setting will apply on the next batch retrieval.
238
240
*
239
241
* @param n the number of elements to return in a batch
@@ -243,7 +245,7 @@ public DBCursor batchSize( int n ){
243
245
// check for special case, used to have server bug with 1
244
246
if ( n == 1 )
245
247
n = 2;
246
-
248
+
247
249
if ( _it != null ) {
248
250
if (_itinstanceofDBApiLayer.Result)
249
251
((DBApiLayer.Result)_it).setBatchSize(n);
@@ -273,18 +275,18 @@ public DBCursor skip( int n ){
0 commit comments