File tree 3 files changed +10
-0
lines changed
3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,10 @@ where
163
163
if get_more. exhausted {
164
164
self . mark_exhausted ( ) ;
165
165
}
166
+ if get_more. id != 0 {
167
+ self . info . id = get_more. id
168
+ }
169
+ self . info . ns = get_more. ns ;
166
170
self . state_mut ( ) . buffer = CursorBuffer :: new ( get_more. batch ) ;
167
171
self . state_mut ( ) . post_batch_resume_token = get_more. post_batch_resume_token ;
168
172
Original file line number Diff line number Diff line change @@ -95,6 +95,8 @@ impl<'conn> OperationWithDefaults for GetMore<'conn> {
95
95
batch : response. cursor . next_batch ,
96
96
exhausted : response. cursor . id == 0 ,
97
97
post_batch_resume_token : ResumeToken :: from_raw ( response. cursor . post_batch_resume_token ) ,
98
+ id : response. cursor . id ,
99
+ ns : Namespace :: from_str ( response. cursor . ns . as_str ( ) ) . unwrap ( ) ,
98
100
} )
99
101
}
100
102
@@ -118,4 +120,5 @@ struct NextBatchBody {
118
120
id : i64 ,
119
121
next_batch : VecDeque < RawDocumentBuf > ,
120
122
post_batch_resume_token : Option < RawDocumentBuf > ,
123
+ ns : String ,
121
124
}
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ use crate::{
6
6
bson:: { serde_helpers, Bson , Document } ,
7
7
change_stream:: event:: ResumeToken ,
8
8
db:: options:: CreateCollectionOptions ,
9
+ Namespace ,
9
10
serde_util,
10
11
} ;
11
12
@@ -108,6 +109,8 @@ pub(crate) struct GetMoreResult {
108
109
pub ( crate ) batch : VecDeque < RawDocumentBuf > ,
109
110
pub ( crate ) exhausted : bool ,
110
111
pub ( crate ) post_batch_resume_token : Option < ResumeToken > ,
112
+ pub ( crate ) ns : Namespace ,
113
+ pub ( crate ) id : i64 ,
111
114
}
112
115
113
116
/// Describes the type of data store returned when executing
You can’t perform that action at this time.
0 commit comments