Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (this.group) js.group = this.group;
if (this.introspection) js.introspection = this.introspection;
if (this.subsetFormula) js.subsetFormula = this.subsetFormula;
if (this.defaultTimezone) js.defaultTimezone = this.defaultTimezone.toJS();
if (this.defaultFilter) js.defaultFilter = this.defaultFilter.toJS();
if (this.defaultSplitDimensions) js.defaultSplitDimensions = this.defaultSplitDimensions.toArray();
if (this.defaultDuration) js.defaultDuration = this.defaultDuration.toJS();
if (this.defaultSortMeasure) js.defaultSortMeasure = this.defaultSortMeasure;
if (this.defaultSelectedMeasures) js.defaultSelectedMeasures = this.defaultSelectedMeasures.toArray();
if (this.defaultPinnedDimensions) js.defaultPinnedDimensions = this.defaultPinnedDimensions.toArray();
if (this.rollup) js.rollup = true;
if (this.maxSplits) js.maxSplits = this.maxSplits;
if (this.maxQueries) js.maxQueries = this.maxQueries;
if (this.timeAttribute) js.timeAttribute = this.timeAttribute.name;
if (this.attributeOverrides.length) js.attributeOverrides = AttributeInfo.toJSs(this.attributeOverrides);
if (this.attributes.length) js.attributes = AttributeInfo.toJSs(this.attributes);
if (this.derivedAttributes) js.derivedAttributes = Expression.expressionLookupToJS(this.derivedAttributes);
if (Object.keys(this.options).length) js.options = this.options;
return js;
}
formula: "$language.lookup(wiki_language_lookup)"
}
],
measures: [
{
name: "added",
formula: "$main.sum($added)"
},
{
name: "addedByDeleted",
formula: "$main.sum($added) / $main.sum($deleted)"
}
]
}, context);
expect(AttributeInfo.toJSs(dataCube.deduceAttributes())).to.deep.equal([
{
name: "__time",
type: "TIME"
},
{
name: "page",
type: "STRING"
},
{
name: "user",
type: "STRING"
},
{
name: "language",
type: "STRING"
},
if (this.extendedDescription) js.extendedDescription = this.extendedDescription;
if (this.group) js.group = this.group;
if (this.introspection) js.introspection = this.introspection;
if (this.subsetFormula) js.subsetFormula = this.subsetFormula;
if (this.defaultTimezone) js.defaultTimezone = this.defaultTimezone.toJS();
if (this.defaultFilter) js.defaultFilter = this.defaultFilter.toJS();
if (this.defaultSplitDimensions) js.defaultSplitDimensions = this.defaultSplitDimensions.toArray();
if (this.defaultDuration) js.defaultDuration = this.defaultDuration.toJS();
if (this.defaultSortMeasure) js.defaultSortMeasure = this.defaultSortMeasure;
if (this.defaultSelectedMeasures) js.defaultSelectedMeasures = this.defaultSelectedMeasures.toArray();
if (this.defaultPinnedDimensions) js.defaultPinnedDimensions = this.defaultPinnedDimensions.toArray();
if (this.rollup) js.rollup = true;
if (this.maxSplits) js.maxSplits = this.maxSplits;
if (this.maxQueries) js.maxQueries = this.maxQueries;
if (this.timeAttribute) js.timeAttribute = this.timeAttribute.name;
if (this.attributeOverrides.length) js.attributeOverrides = AttributeInfo.toJSs(this.attributeOverrides);
if (this.attributes.length) js.attributes = AttributeInfo.toJSs(this.attributes);
if (this.derivedAttributes) js.derivedAttributes = Expression.expressionLookupToJS(this.derivedAttributes);
if (Object.keys(this.options).length) js.options = this.options;
return js;
}
valueToString={(value: AttributeInfo[]) => value ? JSON.stringify(AttributeInfo.toJSs(value), null, 2) : undefined}
stringToValue={(str: string) => str ? AttributeInfo.fromJSs(JSON.parse(str)) : undefined}