(&self, txn: &mut TransactionMut, id: &str, f: F)
| 325 | } |
| 326 | |
| 327 | fn update_map<F>(&self, txn: &mut TransactionMut, id: &str, f: F) |
| 328 | where |
| 329 | F: FnOnce(&mut HashMap<String, Any>), |
| 330 | { |
| 331 | let map_ref: MapRef = self.upsert(txn, id); |
| 332 | let mut map = map_ref.to_json(txn).into_map().unwrap(); |
| 333 | f(&mut map); |
| 334 | Any::from(map).fill(txn, &map_ref).unwrap(); |
| 335 | } |
| 336 | |
| 337 | fn index_by_id<T: ReadTxn>(&self, txn: &T, id: &str) -> Option<u32> { |
| 338 | let i = self.iter(txn).position(|value| { |