UNPKG

reveal-sdk-node

Version:

RevealBI Node.js SDK

58 lines (57 loc) 2.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RVSqlPDSDataSource = void 0; const RVSqlBasedDataSource_1 = require("./RVSqlBasedDataSource"); class RVSqlPDSDataSource extends RVSqlBasedDataSource_1.RVSqlBasedDataSource { /** @hidden */ constructor(json) { super(json); this._processDataOnServerDefaultValue = false; this._processDataOnServerReadOnly = false; if (!json) { this.processDataOnServerDefaultValue = true; } else { var props = json["Properties"]; if (props) { this._processDataOnServerDefaultValue = props["ServerAggregationDefault"]; this._processDataOnServerReadOnly = props["ServerAggregationReadOnly"]; } } } /** Sets the default value for "Process Data on Server" option for this data source, the * end user can still change the value, unless {@link processDataOnServerReadOnly} is true. */ get processDataOnServerDefaultValue() { return this._processDataOnServerDefaultValue; } set processDataOnServerDefaultValue(value) { this._processDataOnServerDefaultValue = value; } /** * When set to true the user will not be allowed to change the value for "Process Data on Server" option * and the default value will be used. */ get processDataOnServerReadOnly() { return this._processDataOnServerReadOnly; } set processDataOnServerReadOnly(value) { this._processDataOnServerReadOnly = value; } /** @hidden */ toJson() { var json = super.toJson(); var props = json.Properties; props["ServerAggregationDefault"] = this._processDataOnServerDefaultValue; props["ServerAggregationReadOnly"] = this._processDataOnServerReadOnly; return json; } /** @hidden */ _getWrapper() { var wrapper = super._getWrapper(); wrapper.processDataOnServerDefaultValue(this.processDataOnServerDefaultValue); wrapper.processDataOnServerReadOnly(this.processDataOnServerReadOnly); return wrapper; } } exports.RVSqlPDSDataSource = RVSqlPDSDataSource;