| 109 | |
| 110 | export class SetAction extends Action { |
| 111 | execute(multiIndex, row, changes) { |
| 112 | let [e,a,v] = this.resolve(row); |
| 113 | // multidb |
| 114 | for(let scope of this.scopes) { |
| 115 | let curIndex = multiIndex.getIndex(scope); |
| 116 | let vIndex = curIndex.lookup(e,a,undefined); |
| 117 | if(vIndex !== undefined) { |
| 118 | let keys = Object.keys(vIndex.index); |
| 119 | for(let key of keys) { |
| 120 | let value = vIndex.index[key].value; |
| 121 | if(value !== v) { |
| 122 | changes.unstore(scope,e,a,value); |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | changes.store(scope,e,a,v,this.node); |
| 127 | } |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | export var ActionImplementations = { |