A Minimalistic Wrapper for IndexedDB
APACHE-2.0 License
Published by dfahlander over 9 years ago
// Include addon "Dexie.Yield", and simplify your application code dramatically:
db.transaction('rw', db.friends, db.pets, function* () {
var catId = yield db.pets.add({ name: "Tito", kind: "cat" });
var dogId = yield db.pets.add({ name: "Josephina", kind: "dog" });
var friendId = yield db.friends.add({ name: "Gurra G", pets: [catId, dogId] });
var gurra = yield db.friends.where('name').equals("Gurra G").first();
var gurrasPets = yield db.pets.where('id').anyOf(gurra.pets).toArray();
console.log(JSON.stringify(gurrasPets));
});
In short, any method that returns a promise can be yielded instead of .then():ed. See more samples in tests-yield.html
Published by dfahlander over 9 years ago
Fixes since v1.0.3:
Features:
Bugs:
Bugs in addons:
Published by dfahlander over 9 years ago
Safari native indeedDB support.
Alternate Safari support using indexedDBShim:
Published by dfahlander almost 10 years ago
Published by dfahlander almost 10 years ago
Releasing patch version 1.0.1
Published by dfahlander almost 10 years ago
Dexie v1.0 testing