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

Method get

src/repr/src/update.rs:139–151  ·  view source on GitHub ↗
(&self, index: usize)

Source from the content-addressed store, hash-verified

137 }
138 }
139 pub fn get(&self, index: usize) -> Option<&RowRef> {
140 if index >= self.run_ends.len() {
141 return None;
142 }
143 let lo = if index == 0 {
144 0
145 } else {
146 self.run_ends[index - 1] - self.run_start
147 };
148 let hi = self.run_ends[index] - self.run_start;
149 // SAFETY: endpoints and data taken from a pushed encoded run.
150 Some(unsafe { RowRef::from_slice(&self.bytes[lo..hi]) })
151 }
152
153 pub fn iter(&self) -> impl Iterator<Item = &RowRef> {
154 [0].into_iter()

Callers 11

get_name_idxMethod · 0.45
get_typeMethod · 0.45
at_versionMethod · 0.45
validate_innerMethod · 0.45
interesting_datumsMethod · 0.45
humanize_idMethod · 0.45
humanize_id_partsMethod · 0.45
column_names_for_idMethod · 0.45
humanize_columnMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by 1