UNPKG

reveal-sdk-node

Version:

RevealBI Node.js SDK

57 lines (56 loc) 1.72 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RVRedshiftDataSource = void 0; const RVSqlBasedDataSource_1 = require("../AbstractClasses/RVSqlBasedDataSource"); /** Amazon Redshift data source, it adds the database name property to the base properties inherited from the abstract class RVSqlBasedDataSource. */ class RVRedshiftDataSource extends RVSqlBasedDataSource_1.RVSqlBasedDataSource { /** @hidden */ constructor(json) { super(json); this._database = null; this._schema = null; if (json) { var props = json.Properties; this._database = props['Database']; this._schema = props['Schema']; } } /** @hidden */ toJson() { var json = super.toJson(); var props = json.Properties; props['Database'] = this._database; props['Schema'] = this._schema; return json; } /** @hidden */ getProviderKey() { return 'AMAZON_REDSHIFT'; } /** Name of the database to connect to. */ get database() { return this._database; } set database(value) { this._database = value; } /** Name of the schema to use. */ get schema() { return this._schema; } set schema(value) { this._schema = value; } /** @hidden */ getType() { return "RVRedshiftDataSource"; } /** @hidden */ _getWrapper() { let wrapper = super._getWrapper(); wrapper.database(this.database); wrapper.schema(this.schema); return wrapper; } } exports.RVRedshiftDataSource = RVRedshiftDataSource;