-
-
Notifications
You must be signed in to change notification settings - Fork 668
Dexie.[table]
David Fahlander edited this page Mar 20, 2015
·
6 revisions
var db = new Dexie(dbName);
db.version(1).stores({table1: "...", table2: "..."});
db.open();
assert (db.table1 instanceOf db.WriteableTable);
assert (db.table2 instanceOf db.WriteableTable);
This is a dynamic property and the current transaction state will affect the resulting WriteableTable instance returned. So do not store the result of this property somewhere else beacuse then it stop executing its operations within the current transaction scope at the time you do operations on it. See this post that explains a bit of that.
var db = new Dexie("MyDB");
db.version(1).stores({friends: "++id,name,gender", pets: "++id,name,kind"});
db.open();
db.friends.add({name: "Simon", gender: "male"});
db.pets.add({name: "Josephina", kind: "dog"});
Dexie.js - minimalistic and bullet proof indexedDB library