Table - zuki/Dexie.js GitHub Wiki
The Table class represents an IDBObjectStore.
Inheritance Hierarchy
- Table
Properties
name
The name of the object store represented by this Table instance.
schema
The table schema of this object store.
Events
hook('creating')
Atomic CRUD hook called when object is about to be created in db.
hook('reading')
Atomic CRUD hook called when object has been read from db and is about to be delivered to caller.
hook('updating')
Atomic CRUD hook called when object is about to be modified in db.
hook('deleting')
Atomic CRUD hook called when object is about to be deleted from db.
Methods
get()
Retrieve object by primary key.
where()
Retrieve objects using a query.
filter()
Apply javascript filter on all items in the object store
count()
Count all objects.
offset()
Return a Collection ordered by primary key, where the first N items in the table are ignored.
limit()
Return a Collection ordered by primary key, limited to N items.
each()
Iterate all objects in store.
toArray()
Get an array containing all objects in store.
toCollection()
Get a Collection containing all objects in store.
orderBy()
Returns a Collection instance ordered by given index.
reverse()
Returns a Collection instance with reversed order of the primary key.
mapToClass()
Map this table to javascript constructor function.
defineClass()
Define a javascript constructor function and map to this table.