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

Function fold_transaction_range

crates/commitlog/src/commitlog.rs:578–598  ·  view source on GitHub ↗
(
    repo: R,
    max_log_format_version: u8,
    range: impl RangeBounds<u64>,
    de: D,
)

Source from the content-addressed store, hash-verified

576}
577
578pub fn fold_transaction_range<R, D>(
579 repo: R,
580 max_log_format_version: u8,
581 range: impl RangeBounds<u64>,
582 de: D,
583) -> Result<(), D::Error>
584where
585 R: Repo,
586 D: Decoder,
587 D::Error: From<error::Traversal> + From<io::Error>,
588{
589 use std::ops::Bound::*;
590
591 let start = match range.start_bound() {
592 Included(x) => *x,
593 Excluded(x) => x + 1,
594 Unbounded => 0,
595 };
596 let commits = commits_from(repo, max_log_format_version, start)?;
597 fold_transactions_internal(commits.with_log_format_version(), de, range)
598}
599
600fn transactions_from_internal<'a, R, D, T>(
601 commits: CommitsWithVersion<R>,

Callers 1

fold_transactions_fromFunction · 0.70

Calls 4

commits_fromFunction · 0.70
start_boundMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…