Trunk row facts for a path: (trunk, row path). Opens a fresh Repository — never call while another writable handle is held.
(root: &Path, path: &str)
| 1368 | /// Trunk row facts for a path: (trunk, row path). Opens a fresh Repository — |
| 1369 | /// never call while another writable handle is held. |
| 1370 | fn trunk_facts(root: &Path, path: &str) -> Option<(TrunkId, String)> { |
| 1371 | let repo = open_repo(root); |
| 1372 | let txn = repo.pristine().read_txn().unwrap(); |
| 1373 | use atomic_core::crdt::tables::{decode_trunk_id, encode_trunk_id}; |
| 1374 | let trunk = CrdtTxnT::get_trunk_by_path(&txn, path).unwrap(); |
| 1375 | trunk.map(|trunk| { |
| 1376 | let key = encode_trunk_id(&trunk); |
| 1377 | let row = CrdtTxnT::get_crdt_trunk(&txn, &key).unwrap().unwrap(); |
| 1378 | (decode_trunk_id(&key), row.path) |
| 1379 | }) |
| 1380 | } |
| 1381 | |
| 1382 | /// Trunk row facts using an EXISTING Repository handle (no re-open, so it is |
| 1383 | /// safe while the caller holds the database). |
no test coverage detected