async add(storeName, values) {
    const op = this.connection_.startReadWriteOperation(storeName);
    const store = op.store();

    /** @type {!Array<number>} */
    const keys = [];

    // Write each segment out. When each request completes, the key will
    // be in |request.result| as can be seen in
    // https://w3c.github.io/IndexedDB/#key-generator-construct.
    for (const value of values) {
      const request = store.add(value);
      request.onsuccess = (event) => {
        const key = request.result;
        keys.push(key);
      };
    }

    // Wait until the operation completes or else |keys| will not be fully
    // populated.
    await op.promise();
    return keys;
  }
@param {string} storeName
@param {!Array<T>} values
@return {!Promise<!Array<number>>}
@template T
@protected