You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried creating multiple records in indexed-db but it won't allow me. Nike and adidas objectStores
var nike = Lawnchair({adapter:'indexed-db', name:'stores', record:'nike'},function(e){
console.log("nike store open");
this.save({id:1}, function(data){
console.log('nike data: ', data);
});
});
var adidas = Lawnchair({adapter:'indexed-db', name:'stores', record:'adidas'},function(e){
console.log("adidas store open");
this.save({id:1}, function(data){
console.log('adidas data: ', data);
});
});
I think this is how to create multiple records in indexed-db. It will happen on request.onupgradeneeded.
// Handle datastore upgrades.
request.onupgradeneeded = function(e) {
var db = e.target.result;
var nike = db.createObjectStore('nike');
var adidas = db.createObjectStore('adidas');
};
If I can't create an adidas record this is actually the error that is thrown: [Exception... "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." code: "8" ...]
The text was updated successfully, but these errors were encountered:
Hi,
I tried creating multiple records in indexed-db but it won't allow me.
Nike and adidas
objectStoresI think this is how to create multiple records in indexed-db. It will happen on request.onupgradeneeded.
If I can't create an
adidas
record this is actually the error that is thrown:[Exception... "The operation failed because the requested database object could not be found. For example, an object store did not exist but was being opened." code: "8" ...]
The text was updated successfully, but these errors were encountered: