UNPKG

reveal-sdk-node

Version:

RevealBI Node.js SDK

66 lines (65 loc) 2.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RVSQLiteDataSourceItem = void 0; const RVSqlPDSDataSourceItem_1 = require("../AbstractClasses/RVSqlPDSDataSourceItem"); const RVSQLiteDataSource_1 = require("./RVSQLiteDataSource"); // @endif /** SQLite data source item */ class RVSQLiteDataSourceItem extends RVSqlPDSDataSourceItem_1.RVSqlPDSDataSourceItem { /** @hidden */ constructor(arg) { var _a; super(arg); this._disableDateTypeInference = null; // @if SERVER_SDK this._customQuery = null; if (arg instanceof RVSQLiteDataSource_1.RVSQLiteDataSource) { this.database = arg.database; } else { const props = arg["Properties"]; if (props) { this._disableDateTypeInference = (_a = props["DisableDateTypeInference"]) !== null && _a !== void 0 ? _a : null; } // @if SERVER_SDK this.deserializeCustomQuerySupport(arg, false); // @endif } } /** * 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"]; // @if SERVER_SDK this.serializeCustomQuerySupport(json, false); // @endif if (this._disableDateTypeInference != null) { props["DisableDateTypeInference"] = this._disableDateTypeInference; } return json; } get customQuery() { return this._customQuery; } set customQuery(value) { this._customQuery = value; } // @endif /** @hidden */ getType() { return "RVSQLiteDataSourceItem"; } } exports.RVSQLiteDataSourceItem = RVSQLiteDataSourceItem;