Thank you so much for this easy to understand introduction to indexedDB. Both Google blogs and Mozilla documentation failed deeply to explain this in an easily understandable way!
@All Things JavaScript This was an excellent and simplistic tutorial. Thanks for getting straight to the point and simple explanations. I gave a like. 😊
Hi, as per latest MDN docs - 'If the database doesn't already exist, it is created by the open operation, then an onupgradeneeded event is triggered and you create the database schema in the handler for this event. If the database does exist but you are specifying an upgraded version number, an onupgradeneeded event is triggered straight away, allowing you to provide an updated schema in its handler'(developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB) . This contradicts your statement @15:14
All Things Javascript, LLC What is the event which you have specified as e in onerror, onsuccsess etc. anonymous functions parameter? : ) Another question, if i get this ERROR what should i do? Uncaught DOMException: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found. at IDBOpenDBRequest.request.onsuccess
@@AllThingsJavaScript can you please tell this also ? how to resolve it Uncaught DOMEXception: Failed to execute 'transaction' on IndexedDb.js: 'IDBDatabase': One of the specified object stores was not found. at IDBOpenDBRequest.request.onsuccess
Great Video. I am new at JavaScript and this was really helpfull. I Have one Question tho. There is no problem setting the callbacks to the open request after the actual request was made?
@@AllThingsJavaScript i am refering to the onerror, onsucess and onupgradeneeded that you set in request. You opened the database before setting the event callback, so could not a situation occur where the event occurs after the callback for this event has been set? the timestamp you set the callbacks are 7:53
@@AllThingsJavaScript what is the best option for creating phone gap app. i am currently using websql but that can be banned anytime.I can't find any gud alternative method.
On line 9 we need to open the database. That is the first step. The act of opening a database returns a response and if it is successful it will return a reference to the database. So we grab the data, or a reference to the database in line 16. And that is the database that we work with. As to which I am using, notice that the db variable is global with the exception of the one in onupgradeneeded handler. That is local to the function. So anything done in there is not referencing the global db. All others reference the global db, so the same database.
Thank you so much for this easy to understand introduction to indexedDB. Both Google blogs and Mozilla documentation failed deeply to explain this in an easily understandable way!
quick and concise, much appreciated in the middle of my work shift!! had a few hiccups but none that completely roadblocked me
Excellent video! Well described. Simple. Straight forward. Nice balance of complexity and simplicity. Thanks!
@All Things JavaScript This was an excellent and simplistic tutorial. Thanks for getting straight to the point and simple explanations. I gave a like. 😊
Thank you for this clear presentation, i have now understood what indexeddb is.
Very clear and simple intro to IndexedDB! Thx
Thanks very much. Great tutorial
Clear and to the point. great job
Great intro. Thank you for posting
Precise and concise , great resource!
Thank you. Nice video. thanks for the practical example.
Thank you very much, that helped a lot. I had to set playback speed to 1.5 however :D
Nicely done --- thank you!
Thank you so much for your video! It helped me so much!
Glad it helped!
Thank you.
Perfect Explanation! :)
Great video brother thanks
Hi, as per latest MDN docs - 'If the database doesn't already exist, it is created by the open operation, then an onupgradeneeded event is triggered and you create the database schema in the handler for this event. If the database does exist but you are specifying an upgraded version number, an onupgradeneeded event is triggered straight away, allowing you to provide an updated schema in its handler'(developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB) . This contradicts your statement @15:14
Thanks for adding to this! It is important to keep the information accurate and I appreciate everyone's help doing this.
Nice for beginners.. Thanks!
Thanks alot Stephen !
Thanks Stephen!
So helpful! Thank you
It was very helpful!
All Things Javascript, LLC
What is the event which you have specified as e in onerror, onsuccsess etc. anonymous functions parameter? : )
Another question, if i get this ERROR what should i do?
Uncaught DOMException: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.
at IDBOpenDBRequest.request.onsuccess
It is an error object that is automatically sent when the event occurs. Does that help?
@@AllThingsJavaScript
can you please tell this also ? how to resolve it
Uncaught DOMEXception: Failed to execute 'transaction' on IndexedDb.js:
'IDBDatabase': One of the specified object stores was not found. at IDBOpenDBRequest.request.onsuccess
@@shivamkhurana452 It looks like the stored data was removed or you are trying to access the wrong data.
Thank you, Good material ! :)
Great Video. I am new at JavaScript and this was really helpfull. I Have one Question tho. There is no problem setting the callbacks to the open request after the actual request was made?
Hi Vinicius, not sure I understand. Which callback are you referring to? Do you have a timestamp from the tutorial?
@@AllThingsJavaScript i am refering to the onerror, onsucess and onupgradeneeded that you set in request. You opened the database before setting the event callback, so could not a situation occur where the event occurs after the callback for this event has been set? the timestamp you set the callbacks are 7:53
@@viniciusr.m.6680 You are correct. Following good coding practices I should declare the handlers before opening the database.
if user deletes browsing history, is it gonna remove all the index db storage right?
Yes, it could depending on certain factors.
@@AllThingsJavaScript what is the best option for creating phone gap app. i am currently using websql but that can be banned anytime.I can't find any gud alternative method.
@@sandhunba Not a lot of experience with phone gap
Hi, I want my values to access in another domain. How do achieve that?
As far as I know indexDB cannot be used across domains.
@@AllThingsJavaScript Can you suggest me some alternative with some example?
An alternative for cross domain? I think at that point you would want to use server side database.
@@mohdfaiz4072 try firebase db.
I dont underestand why you define two times the varieables db,store , index : line 9 and line 16?
and when you use them i dont khow wich one of them you are using
On line 9 we need to open the database. That is the first step. The act of opening a database returns a response and if it is successful it will return a reference to the database. So we grab the data, or a reference to the database in line 16. And that is the database that we work with. As to which I am using, notice that the db variable is global with the exception of the one in onupgradeneeded handler. That is local to the function. So anything done in there is not referencing the global db. All others reference the global db, so the same database.
Thank you!!
I know its a little late but whenever i try to get the data from the database and return it, it‘s undefined or simply empty. Can someone help me?
Post your code.
Helpful
nice!
OMG indexedDB is awful....
why ?
Not a technical criteria... I just hate them
@@JorgeMendez-ik6pv Whats the alternative besides local storage? Would you say indexdb is faster?
Well, I prefer SQLite.
Jorge Mendez they have them in browser?!
Thanks a lot!