-
-
Notifications
You must be signed in to change notification settings - Fork 669
Dexie.defineClass()
David Fahlander edited this page May 6, 2014
·
3 revisions
var Class = Dexie.defineClass(structure);
var Friend = Dexie.defineClass({
name: String,
shoeSize: Number
});
Friend.prototype.sayHi = function () {
alert ("Hi, my name is " + this.name);
}
var db = new Dexie("FriendsDB");
db.version(1).stores({friends: "++id,name"});
db.friends.mapToClass (Friend);
Dexie.js - minimalistic and bullet proof indexedDB library