UNPKG

reveal-sdk-node

Version:

RevealBI Node.js SDK

66 lines (65 loc) 2.43 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RVRedshiftDataSourceItem = void 0; const RVSqlBasedDataSourceItem_1 = require("../AbstractClasses/RVSqlBasedDataSourceItem"); const RVRedshiftDataSource_1 = require("./RVRedshiftDataSource"); /** Amazon Redshift data source item */ class RVRedshiftDataSourceItem extends RVSqlBasedDataSourceItem_1.RVSqlBasedDataSourceItem { /** @hidden */ constructor(arg) { super(arg); this._schema = null; this._functionName = null; this._functionParameters = null; if (!(arg instanceof RVRedshiftDataSource_1.RVRedshiftDataSource)) { var props = arg.Properties; this._schema = props["Schema"]; this._functionName = props["Function"]; this._functionParameters = arg["Parameters"]; } } /** @hidden */ toJson() { var json = super.toJson(); var props = json['Properties']; props['Schema'] = this._schema; props['Function'] = this._functionName; //copy functionParameters values to parameters Object.assign(json['Parameters'], this._functionParameters); return json; } /** Name of the schema the referenced table belongs to */ get schema() { return this._schema; } set schema(value) { this._schema = value; } /** (Optional) name of the function to get data from, the function is expected to return a result set and might have multiple parameters. */ get functionName() { return this._functionName; } set functionName(value) { this._functionName = value; } /** Parameters to be passed to the function, if there is such specified in {@link RVPostgresDataSourceItem.functionName}.*/ get functionParameters() { return this._functionParameters; } set functionParameters(value) { this._functionParameters = value; } /** @hidden */ getType() { return "RVRedshiftDataSourceItem"; } /** @hidden */ _getWrapper() { let wrapper = super._getWrapper(); wrapper.schema(this.schema); wrapper.functionName(this.functionName); wrapper.functionParameters(this.functionParameters); return wrapper; } } exports.RVRedshiftDataSourceItem = RVRedshiftDataSourceItem;