function dumpDB(db, tableName, fn) {
  return new goog.Promise(function(resolve, reject) {
    var results = [];
    var tx = db.transaction([tableName], 'readonly');
    var req = tx.objectStore(tableName).openCursor();
    req.onsuccess = function(ev) {
      var cursor = req.result;
      if (cursor) {
        results.push(fn(cursor.value));
        cursor.continue();
      } else {
        resolve(results);
      }
    };
    req.onerror = reject;
  });
}
@param {!IDBDatabase} db
@param {string} tableName
@param {function(!lf.Row.Raw): !T} fn
@template T
@return {!IThenable<!Array<!T>>}