MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / commits_from

Function commits_from

crates/commitlog/src/commitlog.rs:535–551  ·  view source on GitHub ↗
(repo: R, max_log_format_version: u8, offset: u64)

Source from the content-addressed store, hash-verified

533}
534
535pub fn commits_from<R: Repo>(repo: R, max_log_format_version: u8, offset: u64) -> io::Result<Commits<R>> {
536 let mut offsets = repo.existing_offsets()?;
537 if let Some(pos) = offsets.iter().rposition(|&off| off <= offset) {
538 offsets = offsets.split_off(pos);
539 }
540 let segments = Segments {
541 offs: offsets.into_iter(),
542 repo,
543 max_log_format_version,
544 };
545 Ok(Commits {
546 inner: None,
547 segments,
548 last_commit: CommitInfo::Initial { next_offset: offset },
549 last_error: None,
550 })
551}
552
553pub fn transactions_from<'a, R, D, T>(
554 repo: R,

Callers 2

transactions_fromFunction · 0.70
fold_transaction_rangeFunction · 0.70

Calls 4

iterMethod · 0.65
OkFunction · 0.50
existing_offsetsMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…