MCPcopy
hub / github.com/microsoft/SandDance / constructor

Method constructor

packages/search-expression/src/exec.ts:60–72  ·  view source on GitHub ↗
(search: Search, private columns: Column[])

Source from the content-addressed store, hash-verified

58 private groups: SearchExpressionGroup<SearchExpressionLowercase>[];
59
60 constructor(search: Search, private columns: Column[]) {
61 this.groups = (ensureSearchExpressionGroupArray(search) as SearchExpressionGroup<SearchExpressionLowercase>[]).map(g => {
62 const expressions = g.expressions.filter(Boolean);
63 expressions.forEach(ex => {
64 ex.column = this.getColumn(ex.name);
65 ex.valueBool = valueToBoolean(ex.value);
66 ex.valueLow = valueToString(ex.value).toLocaleLowerCase();
67 ex.stringOperation = isStringOperation(ex);
68 });
69 const group = { ...g, expressions };
70 return group;
71 });
72 }
73
74 private getColumn(name: string) {
75 for (let i = 0; i < this.columns.length; i++) {

Callers

nothing calls this directly

Calls 7

getColumnMethod · 0.95
valueToBooleanFunction · 0.70
valueToStringFunction · 0.70
isStringOperationFunction · 0.70
filterMethod · 0.45
forEachMethod · 0.45

Tested by

no test coverage detected