reveal-sdk-node
Version:
RevealBI Node.js SDK
53 lines (52 loc) • 1.57 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.RVSqlBasedDataSource = void 0;
const RVDashboardDataSource_1 = require("./RVDashboardDataSource");
/**
* The base data source class used to represent a connection to one of the supported database systems.
*/
class RVSqlBasedDataSource extends RVDashboardDataSource_1.RVDashboardDataSource {
/** @hidden */
constructor(json) {
super(json);
this._host = null;
this._port = 0;
if (json) {
var props = json["Properties"];
if (props) {
this._host = props["Host"];
this._port = props["Port"];
}
}
}
/** Host name or IP address to connect to. */
get host() {
return this._host;
}
set host(value) {
this._host = value;
}
/* TCP Port to connect to. In case this is an SqlServer datasource and host\instance Port value will/need to be -1.*/
get port() {
return this._port;
}
set port(value) {
this._port = value;
}
/** @hidden */
toJson() {
var json = super.toJson();
var props = json.Properties;
props["Host"] = this._host;
props["Port"] = this._port;
return json;
}
/** @hidden */
_getWrapper() {
var wrapper = super._getWrapper();
wrapper.host(this.host);
wrapper.port(this.port);
return wrapper;
}
}
exports.RVSqlBasedDataSource = RVSqlBasedDataSource;
;