【发布时间】:2014-07-25 17:06:24
【问题描述】:
我正在尝试找到最快的方法来清除object_store(表)中的IndexedDB 中的数据。
假设存储了 5000 多条记录。
我只想到了.deleteObjectStore,但它创建了以下error:
InvalidStateError: A mutation operation was attempted on a database that did not allow mutations.
您似乎只能在versionchange transaction 中使用create 或delete 和object_store。
当database 连接时,实现IndexedDB 等效mysql - truncate tablename 的最快方法是什么?
【问题讨论】:
标签: javascript html indexeddb