/    Sign up×
Community /Pin to ProfileBookmark

Indexed DB – dependent add

Hello,

I have a web app that has a pretty extensive indexed database and I have run into a road block. There is a case where I want to add information to two tables consecutively and the second entry gets the auto incremented id from the first insert. This seems to be impossible because of the async nature of IDB and there isn’t an onsuccess event associated with add() or put()…

any ideas?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @vinnyzwrx spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...