implemented named event handler

This commit is contained in:
Kevin Jahns
2017-07-05 17:01:21 +02:00
parent 7e4dedab38
commit 8abef69aa7
6 changed files with 66 additions and 21 deletions

View File

@@ -401,11 +401,11 @@ export default function extendDatabase (Y /* :any */) {
whenOperationsExist: any;
*/
* tryExecute (op) {
this.store.addToDebug('yield* this.store.tryExecute.call(this, ', JSON.stringify(op), ')')
this.store.addToDebug('yield * this.store.tryExecute.call(this, ', JSON.stringify(op), ')')
if (op.struct === 'Delete') {
yield * Y.Struct.Delete.execute.call(this, op)
// this is now called in Transaction.deleteOperation!
// yield* this.store.operationAdded(this, op)
// yield * this.store.operationAdded(this, op)
} else {
// check if this op was defined
var defined = yield * this.getInsertion(op.id)