UNPKG

reveal-sdk-node

Version:

RevealBI Node.js SDK

49 lines (48 loc) 1.53 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RVSqlBasedDataSourceItem = void 0; const RVDataSourceItem_1 = require("./RVDataSourceItem"); const RVDashboardDataSource_1 = require("./RVDashboardDataSource"); /** * The base item class used to represent a dataset from one of the supported database systems. */ class RVSqlBasedDataSourceItem extends RVDataSourceItem_1.RVDataSourceItem { /** @hidden */ constructor(arg) { super(arg); this._database = null; this._table = null; if (!(arg instanceof RVDashboardDataSource_1.RVDashboardDataSource)) { var props = arg['Properties']; this._database = props['Database']; this._table = props['Table']; } } /** @hidden */ toJson() { var json = super.toJson(); var props = json['Properties']; props['Database'] = this._database; props['Table'] = this._table; return json; } /** * Name of the database to connect to, optional as this value is usually specified in the data source object. */ get database() { return this._database; } set database(value) { this._database = value; } /** * Name of the table (or view) to get data from */ get table() { return this._table; } set table(value) { this._table = value; } } exports.RVSqlBasedDataSourceItem = RVSqlBasedDataSourceItem;