Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7876145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:07:24+00:00 2026-06-03T03:07:24+00:00

Instead of opening several transactions (read a table, write to a table, write to

  • 0

Instead of opening several transactions (read a table, write to a table, write to another table, etc) is it possible to do this all from a single transaction as long as you are using an appropriate IDBTransaction?

Mozilla says: “The only way to keep the transaction active is to make a request on it. When the request is finished you’ll get a DOM event and, assuming that the request succeeded, you’ll have another opportunity to extend the transaction during that callback.” which is a little vague. Does that mean if I provide an event handler for the DOM callback that I can use the transaction at any point in that callback without ever having to worry about the transaction being closed?

https://developer.mozilla.org/en/IndexedDB/Using_IndexedDB#Adding_data_to_the_database

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:07:25+00:00Added an answer on June 3, 2026 at 3:07 am

    IndexedDB transactions commit as soon as the last callback is fired, so the way to keep them alive is to pass them along via callbacks.

    I’m sourcing my transaction info from Jonas Sicking, a Mozilla dev and co-spec writer for IndexedDB, who commented on this excellent blog post to say the following:

    The following sentence isn’t correct “Transactions today auto-commit
    when the transaction variable goes out of scope and no more requests
    can be placed against it”.

    Transaction never automatically commit when a variable goes out of
    scope. Generally they only commit when the last success/error callback
    fires and that callback schedules no more requests. So it’s not
    related to the scope of any variables.

    The only exception to this is if you create a transaction but place no
    requests against it. In that case the transaction is “committed”
    (whatever that means for a transaction which has no requests) as soon
    as you return to the event loop. In this scenario you could
    technically “commit” the transaction as soon as all references to it
    go out of scope, but it’s not a particularly interesting use case to
    optimize.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

instead of popup from center can we change to another animation (eg, undo animation)?
Instead of using an interface like this: public interface IStartable { void Start(); void
Instead of individually calling $(#item).removeClass() for every single class an element might have, is
We have been using ddeexec registry entries to handle opening a design from Explorer.
Refining my question little bit this time. :D I have this function, but instead
I stumbled upon this question from two years ago. Is there a way to
Instead of opening a new pop up I want to show a pseudo pop
I'm trying to change the default behavior of context menus: Instead of opening on
I want to prompt users to save file instead of opening file in application.
Am running simple jquery code for opening the popup window in visual studio.Instead of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.