function performMutations(rowsPerVersion, query, callback) {
  var currentVersion = -1;
  var observable = [];
  var oldResults = lf.proc.Relation.createEmpty();
  var diffCalculator = new lf.DiffCalculator(query, observable);

  /**
   * Updates the observed results to the next version, which should trigger the
   * observer callback.
   */
  var updateResultsToNextVersion = function() {
    currentVersion++;
    var table = schema.table('tableA');
    var newResults = lf.proc.Relation.fromRows(
        rowsPerVersion[currentVersion], [table.getName()]);
    var changeRecords = /** @type {!Array<!lf.DiffCalculator.ChangeRecord>} */ (
        diffCalculator.applyDiff(oldResults, newResults));
    oldResults = newResults;

    callback(currentVersion, changeRecords);
    if (currentVersion < rowsPerVersion.length - 1) {
      updateResultsToNextVersion();
    }
  };

  updateResultsToNextVersion();
}
Performs a series of mutations.
@param {!Array<!Array<!lf.Row>>} rowsPerVersion The query results for each
    version to be simulated.
@param {!lf.query.SelectContext} query The query being observed.
@param {!function(number, !Array<?>)} callback The function to be called
    every time a change is applied.