UNPKG

reveal-sdk-node

Version:

RevealBI Node.js SDK

57 lines (56 loc) 1.78 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RVPostgresDataSource = void 0; const RVSqlPDSDataSource_1 = require("../AbstractClasses/RVSqlPDSDataSource"); /** PostgreSQL data source, it adds the database name property to the base properties inherited from the abstract class RVSqlBasedDataSource. */ class RVPostgresDataSource extends RVSqlPDSDataSource_1.RVSqlPDSDataSource { /** @hidden */ constructor(json) { super(json); this._database = null; this._schema = null; if (json) { var props = json.Properties; this._database = props === null || props === void 0 ? void 0 : props.Database; this._schema = props === null || props === void 0 ? void 0 : props.Schema; } } /** 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 */ toJson() { var json = super.toJson(); var props = json.Properties; props.Database = this._database; props.Schema = this._schema; return json; } /** @hidden */ getProviderKey() { return 'POSTGRES'; } /** @hidden */ getType() { return "RVPostgresDataSource"; } /** @hidden */ _getWrapper() { let wrapper = super._getWrapper(); wrapper.database(this.database); wrapper.schema(this.schema); return wrapper; } } exports.RVPostgresDataSource = RVPostgresDataSource;