Skip to content

Dexie.Observable.DatabaseChange

David Fahlander edited this page May 6, 2014 · 15 revisions

Structure of database change object.

Properties

rev : Number The revision of this change
source : any Optional. Source of the modification. If the ´source´ property of the Transaction object was set to a value while performing a database operation, this value will be put in the change object. Can be used to ignore certain changes that origin from self.
table : String Name of table
key : any Primary key of changed object
type: Number Type of change. 1=CREATED, 2=UPDATED, 3=DELETED
obj: Object Only if type=1 (CREATED). Contains the created object.
mods: Object Only if type=2 (UPDATED). Contains a set of keyPaths and values that has been modified in the object.
oldObj: Object Only if type=2 (UPDATED) or 3 (DELETED). Contains the object as it was before the change.
Clone this wiki locally