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

Method transactions

crates/commitlog/src/segment.rs:451–468  ·  view source on GitHub ↗
(self, de: &'a D)

Source from the content-addressed store, hash-verified

449
450 #[cfg(test)]
451 pub fn transactions<'a, D>(self, de: &'a D) -> impl Iterator<Item = Result<Transaction<D::Record>, D::Error>> + 'a
452 where
453 D: crate::Decoder,
454 D::Error: From<io::Error>,
455 R: 'a,
456 {
457 use itertools::Itertools as _;
458
459 self.commits()
460 .with_log_format_version()
461 .map(|x| x.map_err(Into::into))
462 .map_ok(move |(version, commit)| {
463 let start = commit.min_tx_offset;
464 commit.into_transactions(version, start, de)
465 })
466 .flatten_ok()
467 .map(|x| x.and_then(|y| y))
468 }
469
470 #[cfg(test)]
471 pub(crate) fn metadata(self) -> Result<Metadata, error::SegmentMetadata> {

Callers 1

transactionsFunction · 0.45

Calls 4

into_transactionsMethod · 0.80
mapMethod · 0.45
commitsMethod · 0.45

Tested by 1

transactionsFunction · 0.36