Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add request to the upgradeCallback function #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

daremachine
Copy link

Hi, I would to add request to the callback as parameter because I need to add some new fields comming in the new db version.
If I have request in the callback I can easy access to the objectStore like

let users = request.transaction.objectStore('users');
users.createIndex("active", "active", { unique: false });

Now is really hard to do this because only request can use standard function of IndexedDb and I like this approach to have open database closed in the one lib function.
If you have better approach how to resolve my problem, I would be happy and teached. Thank you.

Hi, I would to add request to the callback as parameter because I need to add some new fields comming in the new db version.
If I have request in the callback I can easy access to the objectStore like 

let users = request.transaction.objectStore('users');
     users.createIndex("active", "active", { unique: false });

Now is really hard to do this because only request can use standard function of IndexedDb and I like this approach to have open database closed in the one lib function.
If you have better approach how to resolve my problem, I would be happy and teached. Thank you.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant