-
-
Notifications
You must be signed in to change notification settings - Fork 642
Dexie.backendDB()
David Fahlander edited this page May 8, 2014
·
5 revisions
var idb_db = db.backendDB();
Returns the native IndexedDB database instance.
var db = new Dexie("MyDB");
db.version(1).stores({items: "++id"});
db.open().then(function(){
var idb = db.backendDB();
var idbtrans = idb.transaction (['items'], 'readonly');
var itemsStore = idbtrans.objectStore('items');
var req = itemsStore.get(2);
req.onsuccess = function () {
if (req.result)
alert ("Got item " + JSON.stringify(req.result));
else
alert ("Item 2 not found");
};
});
Dexie.js - minimalistic and bullet proof indexedDB library