UNPKG

reveal-sdk-node

Version:

RevealBI Node.js SDK

62 lines (61 loc) 2.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RVSQLiteDataSource = void 0; const RVSqlPDSDataSource_1 = require("../AbstractClasses/RVSqlPDSDataSource"); /** SQLite data source. */ class RVSQLiteDataSource extends RVSqlPDSDataSource_1.RVSqlPDSDataSource { /** @hidden */ constructor(json) { var _a, _b; super(json); this._database = null; this._disableDateTypeInference = null; if (json) { const props = json["Properties"]; if (props) { this._database = (_a = props["Database"]) !== null && _a !== void 0 ? _a : null; this._disableDateTypeInference = (_b = props["DisableDateTypeInference"]) !== null && _b !== void 0 ? _b : null; } } } /** * Path of the SQLite database file. Accepts both absolute paths and relative paths. */ get database() { return this._database; } set database(value) { this._database = value; } /** * Disables automatic date type inference for SQLite columns. * When set to true, columns that would normally be promoted to date/datetime types * (both ISO string patterns and Unix epoch seconds) will remain as their raw types (String or Number). * Defaults to `null`, which leaves inference enabled. */ get disableDateTypeInference() { return this._disableDateTypeInference; } set disableDateTypeInference(value) { this._disableDateTypeInference = value; } /** @hidden */ toJson() { const json = super.toJson(); const props = json["Properties"]; props["Database"] = this._database; if (this._disableDateTypeInference != null) { props["DisableDateTypeInference"] = this._disableDateTypeInference; } return json; } /** @hidden */ getProviderKey() { return "SQLITE"; } /** @hidden */ getType() { return "RVSQLiteDataSource"; } } exports.RVSQLiteDataSource = RVSQLiteDataSource;