UNPKG

reveal-sdk-node

Version:

RevealBI Node.js SDK

92 lines (91 loc) 2.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RVClickHouseDataSource = void 0; const RVSqlPDSDataSource_1 = require("../AbstractClasses/RVSqlPDSDataSource"); /** * ClickHouse data source */ class RVClickHouseDataSource extends RVSqlPDSDataSource_1.RVSqlPDSDataSource { /** @hidden */ constructor(json) { super(json); this._database = null; this._protocol = null; this._path = null; this._timeout = null; this._skipServerCertificateValidation = null; if (json) { let props = json.Properties; this._database = props["Database"]; this._protocol = props["Protocol"]; this._path = props["Path"]; this._timeout = props["Timeout"]; this._skipServerCertificateValidation = props["SkipServerCertificateValidation"]; } } /** * Name of the database to connect to. */ get database() { return this._database; } set database(value) { this._database = value; } /** * (Optional) The protocol used to connect to ClickHouse (e.g. "http", "https"). */ get protocol() { return this._protocol; } set protocol(value) { this._protocol = value; } /** * (Optional) The URL path appended after the host and port. */ get path() { return this._path; } set path(value) { this._path = value; } /** * (Optional) Connection timeout in seconds. */ get timeout() { return this._timeout; } set timeout(value) { this._timeout = value; } /** * (Optional) When true, skips server certificate validation for TLS connections. */ get skipServerCertificateValidation() { return this._skipServerCertificateValidation; } set skipServerCertificateValidation(value) { this._skipServerCertificateValidation = value; } /** @hidden */ toJson() { let json = super.toJson(); let props = json.Properties; props["Database"] = this._database; props["Protocol"] = this._protocol; props["Path"] = this._path; props["Timeout"] = this._timeout; props["SkipServerCertificateValidation"] = this._skipServerCertificateValidation; return json; } /** @hidden */ getProviderKey() { return "CLICKHOUSE"; } /** @hidden */ getType() { return "RVClickHouseDataSource"; } } exports.RVClickHouseDataSource = RVClickHouseDataSource;