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

Function constructor

src/runtime/providers/aggregate.ts:24–46  ·  view source on GitHub ↗
(id: string, args: any[], returns: any[])

Source from the content-addressed store, hash-verified

22 value: any;
23
24 constructor(id: string, args: any[], returns: any[]) {
25 super(id, args, returns);
26 let [value, given, per] = args;
27 if(given === undefined) {
28 this.projectionVars = [];
29 } else if(isVariable(given)) {
30 this.projectionVars = [given];
31 } else {
32 this.projectionVars = given;
33 }
34 if(per === undefined) {
35 this.groupVars = [];
36 } else if(isVariable(per)) {
37 this.groupVars = [per];
38 } else {
39 this.groupVars = per;
40 }
41 this.value = value;
42 this.resolvedGroup = [];
43 this.resolvedProjection = [];
44 this.resolvedAggregate = {group: this.resolvedGroup, projection: this.resolvedProjection, value: undefined};
45 this.aggregateResults = {};
46 }
47
48 resolveAggregate(prefix) {
49 resolve(this.projectionVars, prefix, this.resolvedProjection)

Callers

nothing calls this directly

Calls 1

isVariableFunction · 0.90

Tested by

no test coverage detected