| 77 | } |
| 78 | |
| 79 | fn update_item( |
| 80 | &self, |
| 81 | key_info: &TableKeyInfo, |
| 82 | key: &Item, |
| 83 | actions: &[UpdateAction], |
| 84 | return_old: bool, |
| 85 | return_new: bool, |
| 86 | condition: Option<&Expr>, |
| 87 | maps: &ExpressionMaps, |
| 88 | stream: Option<&StreamCapture>, |
| 89 | ) -> BoxFuture<'_, Result<(Option<Item>, Option<Item>), StorageError>> { |
| 90 | let key_info = key_info.clone(); |
| 91 | let key = key.clone(); |
| 92 | let actions = actions.to_vec(); |
| 93 | let condition = condition.cloned(); |
| 94 | let maps = maps.clone(); |
| 95 | let stream = stream.cloned(); |
| 96 | Box::pin(async move { |
| 97 | self.update_item_impl( |
| 98 | &key_info, |
| 99 | &key, |
| 100 | &actions, |
| 101 | return_old, |
| 102 | return_new, |
| 103 | condition.as_ref(), |
| 104 | &maps, |
| 105 | stream.as_ref(), |
| 106 | ) |
| 107 | .await |
| 108 | }) |
| 109 | } |
| 110 | |
| 111 | fn query( |
| 112 | &self, |