我正在使用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)
该部分的值将类似于“印度”,“泰米尔纳德邦”
请找到附带的屏幕截图以获取错误 …
我想使用JavaScript和匹配函数从字符串'ujj/jkiiiii/jk'获取所有字符串'/ jk'的索引.我能够找到所有字符串但是当我使用/时,它显示错误.