reveal-sdk-node
Version:
RevealBI Node.js SDK
103 lines (102 loc) • 3.71 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RVSqlServerDataSource = void 0;
const RVSqlPDSDataSource_1 = require("../AbstractClasses/RVSqlPDSDataSource");
/** Microsoft SQL Server data source. */
class RVSqlServerDataSource extends RVSqlPDSDataSource_1.RVSqlPDSDataSource {
/** @hidden */
constructor(json) {
var _a, _b;
super(json);
this._database = null;
this._schema = null;
this._encrypt = null;
this._trustServerCertificate = null;
this._applicationIntentReadOnly = null;
this._multiSubnetFailover = null;
if (json) {
var props = json["Properties"];
if (props) {
this._database = props["Database"];
this._schema = props["Schema"];
this._encrypt = props["Encrypt"];
this._trustServerCertificate = props["TrustServerCertificate"];
this._applicationIntentReadOnly = (_a = props["ApplicationIntentReadOnly"]) !== null && _a !== void 0 ? _a : null;
this._multiSubnetFailover = (_b = props["MultiSubnetFailover"]) !== null && _b !== void 0 ? _b : null;
}
}
}
/** 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;
}
/** Set the Encrypt flag in the connection string to the given value.*/
get encrypt() {
return this._encrypt;
}
set encrypt(value) {
this._encrypt = value;
}
/** Set the TrustServerCertificate flag in the connection string to the given value. */
get trustServerCertificate() {
return this._trustServerCertificate;
}
set trustServerCertificate(value) {
this._trustServerCertificate = value;
}
/** If true, sets ApplicationIntent=ReadOnly on the SQL Server connection. */
get applicationIntentReadOnly() {
return this._applicationIntentReadOnly;
}
set applicationIntentReadOnly(value) {
this._applicationIntentReadOnly = value;
}
/** If null, omits MultiSubnetFailover from the SQL Server connection; otherwise sets MultiSubnetFailover=True or MultiSubnetFailover=False based on the given value. */
get multiSubnetFailover() {
return this._multiSubnetFailover;
}
set multiSubnetFailover(value) {
this._multiSubnetFailover = value;
}
/** @hidden */
toJson() {
var json = super.toJson();
var props = json["Properties"];
props["Database"] = this._database;
if (this._schema != null) {
props["Schema"] = this._schema;
}
if (this._encrypt != null) {
props["Encrypt"] = this._encrypt;
}
if (this._trustServerCertificate != null) {
props["TrustServerCertificate"] = this._trustServerCertificate;
}
if (this._applicationIntentReadOnly != null) {
props["ApplicationIntentReadOnly"] = this._applicationIntentReadOnly;
}
if (this._multiSubnetFailover != null) {
props["MultiSubnetFailover"] = this._multiSubnetFailover;
}
return json;
}
/** @hidden */
getProviderKey() {
return 'SQLSERVER';
}
/** @hidden */
getType() {
return "RVSqlServerDataSource";
}
}
exports.RVSqlServerDataSource = RVSqlServerDataSource;