pub fn diff_statements(
table: &str,
dim_cols: &[String],
vt: ValueType,
old: &ResultRows,
new: &ResultRows,
) -> Result<Vec<Statement>>Expand description
The statements that turn old (the table’s rows) into new (the engine’s
rows) of a vt measure: at most one batched upsert of new/changed rows
and one batched delete of vanished rows. Unchanged rows (bit-identical
value) are skipped; a value that is not a vt is an error. With no
dimension columns (a dimensionless measure’s one-row table) the upsert
replaces the table’s row and the delete empties it.