Skip to content

Commit e2db5d7

Browse files
committed
support setting recovery token in Command
1 parent 845a5d0 commit e2db5d7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cmap/conn/command.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ pub(crate) struct Command<T = Document> {
5151
autocommit: Option<bool>,
5252

5353
read_concern: Option<ReadConcern>,
54+
55+
recovery_token: Option<Document>,
5456
}
5557

5658
impl<T> Command<T> {
@@ -67,6 +69,7 @@ impl<T> Command<T> {
6769
start_transaction: None,
6870
autocommit: None,
6971
read_concern: None,
72+
recovery_token: None,
7073
}
7174
}
7275

@@ -79,7 +82,7 @@ impl<T> Command<T> {
7982
}
8083

8184
pub(crate) fn set_recovery_token(&mut self, recovery_token: &Document) {
82-
self.body.insert("recoveryToken", recovery_token);
85+
self.recovery_token = Some(recovery_token.clone());
8386
}
8487

8588
pub(crate) fn set_txn_number(&mut self, txn_number: i64) {

0 commit comments

Comments
 (0)