MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / get_row

Method get_row

nodedb-columnar/src/memtable/mod.rs:127–136  ·  view source on GitHub ↗

Get a single row by index as `Vec `.

(&self, row_idx: usize)

Source from the content-addressed store, hash-verified

125
126 /// Get a single row by index as `Vec<Value>`.
127 pub fn get_row(&self, row_idx: usize) -> Option<Vec<Value>> {
128 if row_idx >= self.row_count {
129 return None;
130 }
131 let mut row = Vec::with_capacity(self.columns.len());
132 for col in &self.columns {
133 row.push(col.get_value(row_idx));
134 }
135 Some(row)
136 }
137
138 /// Truncate the memtable to `n` rows, discarding all rows beyond that point.
139 ///

Callers 2

get_memtable_rowMethod · 0.80

Calls 3

get_valueMethod · 0.80
lenMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected