Convert a [`DmlWrite`] to a [`DatabaseBatch`]
(database_id: i64, write: &DmlWrite)
| 14 | |
| 15 | /// Convert a [`DmlWrite`] to a [`DatabaseBatch`] |
| 16 | pub fn encode_write(database_id: i64, write: &DmlWrite) -> DatabaseBatch { |
| 17 | DatabaseBatch { |
| 18 | table_batches: write |
| 19 | .tables() |
| 20 | .map(|(table_id, batch)| encode_batch(table_id.get(), batch)) |
| 21 | .collect(), |
| 22 | partition_key: write.partition_key().to_string(), |
| 23 | database_id, |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | /// Encode the given mutable batch to a [`TableBatchWithoutId`]. Basically same as [`encode_batch`], |
| 28 | /// but when you don't have an id. |
nothing calls this directly
no test coverage detected
searching dependent graphs…