-
-
Notifications
You must be signed in to change notification settings - Fork 642
Dexie.tables
David Fahlander edited this page May 19, 2014
·
3 revisions
var db = new Dexie(dbName);
db.version(1).stores({table1: "...", table2: "..."});
db.open();
db.tables.forEach(function (table) {
assert (table === db[table.name]);
});
Array<WriteableTable>
var db = new Dexie("MyDB");
db.version(1).stores({friends: "++id,name,gender", pets: "++id,name,kind"});
db.open();
// Output the schema of each table:
db.tables.forEach(function (table) {
console.log("Schema of " + table.name + ": " + JSON.stringify(table.schema));
});
Dexie.js - minimalistic and bullet proof indexedDB library