MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / abbreviate

Method abbreviate

src/sql-server-util/src/cdc.rs:573–583  ·  view source on GitHub ↗

Drops the `record_id` portion of the [`Lsn`] so we can fit an "abbreviation" of this [`Lsn`] into a [`u64`], without losing the total order.

(&self)

Source from the content-addressed store, hash-verified

571 /// Drops the `record_id` portion of the [`Lsn`] so we can fit an "abbreviation"
572 /// of this [`Lsn`] into a [`u64`], without losing the total order.
573 pub fn abbreviate(&self) -> u64 {
574 let mut abbreviated: u64 = 0;
575
576 #[allow(clippy::as_conversions)]
577 {
578 abbreviated += (self.vlf_id as u64) << 32;
579 abbreviated += self.block_id as u64;
580 }
581
582 abbreviated
583 }
584}
585
586impl fmt::Display for Lsn {

Callers 1

test_caseFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_caseFunction · 0.64