无法对“ IDBKeyRange”执行“仅”:参数不是有效的密钥

kam*_*lav 3 indexeddb

我正在使用jsstore的where类从indexeddb获取数据。我得到了响应。但是得到“无法在'IDBKeyRange'上执行'only':参数不是有效的密钥。”控制台错误。为什么我得到此错误。任何人请帮助我。

//Get DBSchema(table & columns)
  private getDbSchema = function () {
    const tblArticle = {
      Name: this._indexedDBLiveDBTableName,
      Columns: [
       {
          Name: 'ParentName',
          NotNull: true,
          DataType: 'string'
        },
        {
          Name: 'ChildName',
          NotNull: true,
          DataType: 'string'
        }
        ,
        {
          Name: 'UpdatedDate',
          NotNull: true,
          DataType: 'string'
        }
      ]
    };

    const Database = {
      Name: this._indexedDBLiveDBName,
      Tables: [tblArticle]
    };
    return Database as any;
  };

 //Fetch articles From IndexedDB
GetArticleFromIndexedDb(section) {
    this._connection.openDb(this._indexedDBLiveDBName);
    return this._connection.select({
      From: this._indexedDBLiveDBTableName,
      Where: {
        ChildName: section
      }
    });
 }
Run Code Online (Sandbox Code Playgroud)

该部分的值将类似于“印度”,“泰米尔纳德邦”

请找到附带的屏幕截图以获取错误

这里

我正在使用jsstore 1.3.0

我将jsstore版本更新为1.4.1,它给出了“超出最大调用堆栈大小”

在此处输入图片说明

谢谢

Ujj*_*pta 5

这是由于提供的值无效。IndexedDB支持值列表-数字,日期,字符串,二进制数据,数组:它们是有效的键。

传递时通常会引发此错误-布尔值,空值或未定义的值。

看看W3C更多信息- https://w3c.github.io/IndexedDB/#key-construct