Insert a PK → location mapping. Returns error if PK already exists.
(
&mut self,
pk_bytes: Vec<u8>,
location: RowLocation,
)
| 58 | |
| 59 | /// Insert a PK → location mapping. Returns error if PK already exists. |
| 60 | pub fn insert( |
| 61 | &mut self, |
| 62 | pk_bytes: Vec<u8>, |
| 63 | location: RowLocation, |
| 64 | ) -> Result<(), ColumnarError> { |
| 65 | if self.inner.contains_key(&pk_bytes) { |
| 66 | return Err(ColumnarError::DuplicatePrimaryKey); |
| 67 | } |
| 68 | self.inner.insert(pk_bytes, location); |
| 69 | Ok(()) |
| 70 | } |
| 71 | |
| 72 | /// Insert or overwrite a PK → location mapping (used during compaction remap). |
| 73 | pub fn upsert(&mut self, pk_bytes: Vec<u8>, location: RowLocation) { |
no outgoing calls