MCPcopy
hub / github.com/witheve/Eve / execute

Method execute

src/runtime/actions.ts:111–128  ·  view source on GitHub ↗
(multiIndex, row, changes)

Source from the content-addressed store, hash-verified

109
110export 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
131export var ActionImplementations = {

Callers 1

executeActionsFunction · 0.45

Calls 5

getIndexMethod · 0.80
resolveMethod · 0.45
lookupMethod · 0.45
unstoreMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected