Search code examples
javascripthtmlcursorindexeddb

indexedDB query inside of cursor loop


I have an indexeddb database, and in it i am running a cursor. Inside of the cursor callback function, I need to run some more queries. Do I do this by creating a whole new connection with indexedDB.open(), should i just call transaction.get() and it will work, or something else entirely?


Solution

  • You can use existing transaction. The is the point of transaction in the first place. You can also create another transaction as well. BTW, no get method in transaction.