(&mut self, ids: &[IdRow])
| 652 | } |
| 653 | |
| 654 | fn import_ids(&mut self, ids: &[IdRow]) -> PristineResult<()> { |
| 655 | let mut external = self.txn.open_table(EXTERNAL)?; |
| 656 | let mut internal = self.txn.open_table(INTERNAL)?; |
| 657 | let mut types = self.txn.open_table(NODE_TYPES)?; |
| 658 | for (id, hash, t) in ids { |
| 659 | external.insert(*id, hash)?; |
| 660 | internal.insert(hash, *id)?; |
| 661 | if let Some(t) = t { |
| 662 | types.insert(*id, *t)?; |
| 663 | } |
| 664 | } |
| 665 | let max = ids.iter().map(|(id, _, _)| *id).max().unwrap_or(0); |
| 666 | self.next_node_id |
| 667 | .fetch_max(max + 1, std::sync::atomic::Ordering::SeqCst); |
| 668 | Ok(()) |
| 669 | } |
| 670 | |
| 671 | /// Write `snapshot` as a view — its own scope, its own parent, its own |
| 672 | /// change log, with the repository's id, state and change count — |
no test coverage detected