Parse an archive key; returns `None` when the key does not have the three NUL-separated segments produced by [`archive_key`].
(key: &str)
| 40 | /// Parse an archive key; returns `None` when the key does not have the |
| 41 | /// three NUL-separated segments produced by [`archive_key`]. |
| 42 | fn parse_archive_key(key: &str) -> Option<(&str, &str, i64)> { |
| 43 | let mut parts = key.splitn(3, '\u{0}'); |
| 44 | let collection = parts.next()?; |
| 45 | let row_id = parts.next()?; |
| 46 | let sys_ms = parts.next()?.parse::<i64>().ok()?; |
| 47 | Some((collection, row_id, sys_ms)) |
| 48 | } |
| 49 | |
| 50 | impl CrdtState { |
| 51 | /// Upsert a row with prior-version archiving for bitemporal |
no test coverage detected