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

Method constructor

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

Source from the content-addressed store, hash-verified

23 aggregateResults: any;
24
25 constructor(id: string, args: any[], returns: any[]) {
26 super(id, args, returns);
27 let [value, direction, per] = args;
28 if(value === undefined) {
29 this.valueVars = [];
30 } else if(isVariable(value)) {
31 this.valueVars = [value];
32 } else {
33 this.valueVars = value;
34 }
35 if(direction === undefined) {
36 this.directionVars = [];
37 } else if(direction.constructor === Array) {
38 this.directionVars = direction;
39 } else {
40 this.directionVars = [direction];
41 }
42 if(per === undefined) {
43 this.groupVars = [];
44 } else if(isVariable(per)) {
45 this.groupVars = [per];
46 } else {
47 this.groupVars = per;
48 }
49 this.resolvedGroup = [];
50 this.resolvedValue = [];
51 this.resolvedDirection = [];
52 this.resolvedAggregate = {group: this.resolvedGroup, value: this.resolvedValue, direction: this.resolvedDirection};
53 this.aggregateResults = {};
54 }
55
56 resolveAggregate(prefix) {
57 resolve(this.valueVars, prefix, this.resolvedValue)

Callers

nothing calls this directly

Calls 1

isVariableFunction · 0.90

Tested by

no test coverage detected