Look up the current row for a PK in the memtable, if present. Returns `None` if the PK is not in the index, or if the PK points to a flushed segment (callers needing cross-segment lookup must go through a segment reader separately). This is the fast path used by `ON CONFLICT DO UPDATE` to read the would-be-merged row when the duplicate hits the memtable — the common case under back-to-back insert
(&self, pk_bytes: &[u8])
| 155 | /// when the duplicate hits the memtable — the common case under |
| 156 | /// back-to-back inserts. |
| 157 | pub fn lookup_memtable_row_by_pk(&self, pk_bytes: &[u8]) -> Option<Vec<Value>> { |
| 158 | let loc = self.pk_index.get(pk_bytes).copied()?; |
| 159 | if loc.segment_id != self.memtable_segment_id { |
| 160 | return None; |
| 161 | } |
| 162 | self.memtable.get_row(loc.row_index as usize) |
| 163 | } |
| 164 | |
| 165 | /// Delete a row by PK value. Returns WAL record to persist. |
| 166 | /// |
no test coverage detected