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

Method transactions

crates/commitlog/src/lib.rs:506–517  ·  view source on GitHub ↗

Obtain an iterator which traverses the log from the start, yielding [`Transaction`]s. The provided `decoder`'s [`Decoder::decode_record`] method will be called [`Commit::n`] times per [`Commit`] to obtain the individual transaction payloads. Like [`Self::commits`], the iterator is not aware of segment rotation. That is, if a new segment is created after this method returns, the iterator will not

(
        &self,
        de: &'a D,
    )

Source from the content-addressed store, hash-verified

504 /// may want to check if the iterator is exhausted (by calling `next()`)
505 /// before treating the `Err` value as an application error.
506 pub fn transactions<'a, D>(
507 &self,
508 de: &'a D,
509 ) -> impl Iterator<Item = Result<Transaction<T>, D::Error>> + 'a + use<'a, D, T, R>
510 where
511 D: Decoder<Record = T>,
512 D::Error: From<error::Traversal>,
513 R: 'a,
514 T: 'a,
515 {
516 self.transactions_from(0, de)
517 }
518
519 /// Obtain an iterator starting from transaction offset `offset`, yielding
520 /// [`Transaction`]s.

Callers

nothing calls this directly

Calls 1

transactions_fromMethod · 0.45

Tested by

no test coverage detected