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

Method result

src/runtime/changes.ts:258–280  ·  view source on GitHub ↗
(scopeLookup?: Object)

Source from the content-addressed store, hash-verified

256 }
257
258 result(scopeLookup?: Object) {
259 let insert = [];
260 let remove = [];
261 let {positions, info} = this.finalChanges;
262 let indexes = this.index.indexes;
263 let keys = Object.keys(positions);
264 for(let key of keys) {
265 let pos = positions[key];
266 let count = info[pos];
267 let e = info[pos + 1];
268 let a = info[pos + 2];
269 let v = info[pos + 3];
270 let scope = info[pos + 5];
271 if(scopeLookup === undefined || scopeLookup[scope]) {
272 if(count < 0 && indexes[scope].lookup(e,a,v) === undefined) {
273 remove.push([e,a,v]);
274 } else if(count > 0 && indexes[scope].lookup(e,a,v) !== undefined) {
275 insert.push([e,a,v]);
276 }
277 }
278 }
279 return {type: "result", insert, remove};
280 }
281
282 _storeObject(operation: "store" | "unstore", id: string, object: any, node: string, scope: string) {
283 for(let attr of Object.keys(object)) {

Callers 6

evaluateFunction · 0.80
evaluatesFunction · 0.80
onFixpointMethod · 0.80
onFixpointMethod · 0.80
onFixpointMethod · 0.80
onFixpointMethod · 0.80

Calls 1

lookupMethod · 0.45

Tested by

no test coverage detected