我正在尝试使用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/