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
{{ message }}
This repository was archived by the owner on Oct 18, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: src/cursor.rs
+22-4Lines changed: 22 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,8 @@ use wire_protocol::operations::Message;
36
36
37
37
use std::collections::vec_deque::VecDeque;
38
38
39
-
pubconstDEFAULT_BATCH_SIZE:i32 = 20;
39
+
// Allows the server to decide the batch size.
40
+
pubconstDEFAULT_BATCH_SIZE:i32 = 0;
40
41
41
42
/// Maintains a connection to the server and lazily returns documents from a
42
43
/// query.
@@ -457,14 +458,31 @@ impl Cursor {
457
458
Ok(vec)
458
459
}
459
460
461
+
/// # Return value
462
+
///
463
+
/// Returns a vector containing the BSON documents that were read.
464
+
#[deprecated(since="0.2.8", note="this method uses 20 as the default batch size instead of letting the server decide; using `drain_current_batch` is recommended instead")]
0 commit comments