Applies a patch to this row.
(
&'a mut self,
db: impl Executor<'c, Database = Db> + 'a,
patch: P,
)
| 122 | |
| 123 | /// Applies a patch to this row. |
| 124 | fn patch<'a, 'c: 'a, P>( |
| 125 | &'a mut self, |
| 126 | db: impl Executor<'c, Database = Db> + 'a, |
| 127 | patch: P, |
| 128 | ) -> impl Future<Output = Result<()>> + Send + 'a |
| 129 | where |
| 130 | P: Patch<Table = Self>, |
| 131 | { |
| 132 | async move { |
| 133 | let patch: P = patch; |
| 134 | patch.patch_row(db, self.id()).send().await?; |
| 135 | patch.apply_to(self); |
| 136 | Ok(()) |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | /// Updates all fields of this row, regardless if they have been changed or not. |
| 141 | fn update<'a, 'c: 'a>( |