MCPcopy Create free account
hub / github.com/microsoft/SandDance / getValues

Function getValues

docs/app/js/sanddance-app.js:12940–12950  ·  view source on GitHub ↗
(ex, column, data, autoCompleteDistinctValues)

Source from the content-addressed store, hash-verified

12938 return Object.keys(distinctMap).sort();
12939}
12940function getValues(ex, column, data, autoCompleteDistinctValues) {
12941 const stats = column && column.stats;
12942 if (stats && stats.distinctValueCount < maxAutocomplete) {
12943 if (!autoCompleteDistinctValues[column.name]) autoCompleteDistinctValues[column.name] = getDistinctValues(data, column.name);
12944 return autoCompleteDistinctValues[column.name].map((v, i)=>({
12945 key: i,
12946 text: v
12947 }));
12948 }
12949 return [];
12950}
12951function getText(ex) {
12952 if (ex.operator === "isnullorEmpty") return "";
12953 return typeof ex.value === "string" ? ex.value : ex.value == null ? "" : ex.value.toString();

Callers 1

SearchTermFunction · 0.70

Calls 1

getDistinctValuesFunction · 0.70

Tested by

no test coverage detected