| 151 | } |
| 152 | |
| 153 | unstore(scope, e,a,v,node?) { |
| 154 | // console.log("REMOVING", e, a, v, node, this.index.lookup(e,a,v,node) === undefined); |
| 155 | if(node === undefined) { |
| 156 | //multidb |
| 157 | let level = this.index.getIndex(scope).lookup(e,a,v); |
| 158 | if(level) { |
| 159 | let index = level.index; |
| 160 | for(let key of Object.keys(index)) { |
| 161 | let nodeValue = index[key]; |
| 162 | this.unstore(scope,e,a,v,nodeValue); |
| 163 | } |
| 164 | } |
| 165 | } else { |
| 166 | let key = this.changes[this.round].unstore(scope,e,a,v,node); |
| 167 | let captured = this.capturedChanges; |
| 168 | if(captured !== undefined) { |
| 169 | captured.unstore(scope, e,a,v,node,key); |
| 170 | } |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | commit() { |
| 175 | let final = this.finalChanges; |