javascript - IndexedDB 支持类似 SQL 的事务吗?

标签 javascript html indexeddb

我正在尝试使用MDN处的文档来理解IndexedDB .

我仍然不清楚它是否支持具有回滚功能的类似 SQL 的事务。

最佳答案

是的,确实如此。

IndexedDB is built on a transactional database model. Everything you do in IndexedDB always happens in the context of a transaction. The IndexedDB API provides lots of objects that represent indexes, tables, cursors, and so on, but each of these is tied to a particular transaction. Thus, you cannot execute commands or open cursors outside of a transaction.

此处有更多信息。

来源:https://developer.mozilla.org/en-US/docs/IndexedDB/Basic_Concepts_Behind_IndexedDB

关于javascript - IndexedDB 支持类似 SQL 的事务吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20244243/

相关文章:

indexeddb - indexedDB 中不区分大小写的搜索

javascript - 出现 test1 警报,但没有出现 test2 警报 - 它们之间的正则表达式无效?

javascript - 如何仅使用 pop 删除特定索引处的数组元素?

javascript - 父 div 元素上的选定目标单击在移动 View 中不起作用,而在 webview 中起作用

JavaScript默认函数值

html - Segoe UI Light 字体在 Google Chrome 中无法正确显示

android - Android 上的 Chrome 浏览器 : Granted Quota for IndexedDB suddenly almost 0

html - RegEx 仅返回 'href' 标签的 'link' 属性?

html - 元名称 ="og:title"VS 元属性 ="og:title"?

javascript - 如何知道浏览器是否支持webSQL?