(
&self,
row_id: &RowId,
data: DatabaseRowDataVariant,
sender: Option<RowChangeSender>,
)
| 220 | } |
| 221 | |
| 222 | async fn create_arc_database_row( |
| 223 | &self, |
| 224 | row_id: &RowId, |
| 225 | data: DatabaseRowDataVariant, |
| 226 | sender: Option<RowChangeSender>, |
| 227 | ) -> Result<Arc<RwLock<DatabaseRow>>, CollabError> { |
| 228 | let client_id = self.reader_client_id().await; |
| 229 | let collab_type = CollabType::DatabaseRow; |
| 230 | let data = data.into_encode_collab(client_id); |
| 231 | if let Some(persistence) = self.reader_persistence() { |
| 232 | persistence.upsert_collab(row_id, data.clone())?; |
| 233 | } |
| 234 | |
| 235 | let collab = build_collab(client_id, row_id, collab_type, data).await?; |
| 236 | let database_row = DatabaseRow::open(*row_id, collab, sender)?; |
| 237 | let arc_row = Arc::new(RwLock::new(database_row)); |
| 238 | if let Some(cache) = self.database_row_cache() { |
| 239 | cache.insert(*row_id, arc_row.clone()); |
| 240 | } |
| 241 | Ok(arc_row) |
| 242 | } |
| 243 | |
| 244 | async fn build_arc_database_row( |
| 245 | &self, |
no test coverage detected