gpt4 book ai didi

indexeddb - 无法在 'only' : The parameter is not a valid key 上执行 'IDBKeyRange'

转载 作者:行者123 更新时间:2023-12-01 11:18:00 27 4
gpt4 key购买 nike

我正在使用 where 类使用 jsstore 从 indexeddb 中获取数据。我得到了响应。但是得到
“无法在‘IDBKeyRange’上执行‘仅’:参数不是有效 key 。”控制台错误。为什么我会收到这个错误。任何人都可以帮助我。

//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
}
});
}

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

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

here

我正在使用 jsstore 1.3.0

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

enter image description here

谢谢

最佳答案

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

当您传递 bool 值、空值或未定义值时,通常会抛出此错误。

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

关于indexeddb - 无法在 'only' : The parameter is not a valid key 上执行 'IDBKeyRange',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48149851/

27 4 0