Insert a cell at `(coord, system_from_ms)`. The `system_from_ms` participates in the tile key so two writes at different system-time stamps produce two separate tile entries.
(&mut self, schema: &ArraySchema, args: PutCell)
| 202 | /// participates in the tile key so two writes at different |
| 203 | /// system-time stamps produce two separate tile entries. |
| 204 | pub fn put_cell(&mut self, schema: &ArraySchema, args: PutCell) -> ArrayResult<TileId> { |
| 205 | let PutCell { |
| 206 | coord, |
| 207 | attrs, |
| 208 | surrogate, |
| 209 | system_from_ms, |
| 210 | valid_from_ms, |
| 211 | valid_until_ms, |
| 212 | lsn, |
| 213 | } = args; |
| 214 | let tile = tile_id_for_cell(schema, &coord, system_from_ms)?; |
| 215 | let payload = CellPayload { |
| 216 | valid_from_ms, |
| 217 | valid_until_ms, |
| 218 | attrs, |
| 219 | surrogate, |
| 220 | }; |
| 221 | let bytes = payload.encode()?; |
| 222 | self.tiles |
| 223 | .entry(tile) |
| 224 | .or_default() |
| 225 | .push_raw(&coord, bytes, lsn)?; |
| 226 | Ok(tile) |
| 227 | } |
| 228 | |
| 229 | /// Append a tombstone version for `(coord, system_from_ms)`. Creates a |
| 230 | /// new tile-version entry in the memtable; does NOT mutate any earlier |