Dexie.js is a wrapper library for indexedDB.
Dexie solves three main issues with the native IndexedDB API:
- Ambivalent error handling
- Poor queries
- Code complexity
Dexie.js solves these limitations and provides a neat database API. Dexie.js aims to be the first-hand choice of a IDB Wrapper Library due to its well thought-through API design, robust error handling, extendability, change tracking awareness and its extended KeyRange support (case insensitive search, set matches and OR operations).
//
// Declare Database
//
var db = new Dexie("FriendDatabase");
db.version(1).stores({ friends: "++id,name,age" });
db.open();
//
// Manipulate and Query Database
//
db.friends.add({name: "Josephine", age: 21}).then(function() {
return db.friends.where("age").below(25).toArray();
}).then(function (youngFriends) {
console.log("My young friends: " + JSON.stringify(youngFriends));
});
https://github.com/dfahlander/Dexie.js/wiki/Dexie.js
https://github.com/dfahlander/Dexie.js/wiki/Samples
https://groups.google.com/forum/#!forum/dexiejs
https://raw.githubusercontent.com/dfahlander/Dexie.js/master/dist/latest/Dexie.js https://raw.githubusercontent.com/dfahlander/Dexie.js/master/dist/latest/Dexie.min.js https://raw.githubusercontent.com/dfahlander/Dexie.js/master/dist/latest/Dexie.min.js.map https://raw.githubusercontent.com/dfahlander/Dexie.js/master/src/Dexie.d.ts