UNPKG

@configurator/ravendb

Version:
54 lines 2.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SubscriptionIncludeBuilder = void 0; const IncludeBuilderBase_1 = require("./IncludeBuilderBase"); const TypeUtil_1 = require("../../../Utility/TypeUtil"); const Constants_1 = require("../../../Constants"); class SubscriptionIncludeBuilder extends IncludeBuilderBase_1.IncludeBuilderBase { includeDocuments(path) { this._includeDocuments(path); return this; } includeCounter(name) { this._includeCounter("", name); return this; } includeCounters(names) { this._includeCounters("", names); return this; } includeAllCounters() { this._includeAllCounters(""); return this; } includeTimeSeries(nameOrNames, type, timeOrCount) { if (TypeUtil_1.TypeUtil.isArray(nameOrNames)) { if (TypeUtil_1.TypeUtil.isNumber(timeOrCount)) { this._includeArrayOfTimeSeriesByRangeTypeAndCount(nameOrNames, type, timeOrCount); } else { this._includeArrayOfTimeSeriesByRangeTypeAndTime(nameOrNames, type, timeOrCount); } } else { if (TypeUtil_1.TypeUtil.isNumber(timeOrCount)) { this._includeTimeSeriesByRangeTypeAndCount("", nameOrNames, type, timeOrCount); } else { this._includeTimeSeriesByRangeTypeAndTime("", nameOrNames, type, timeOrCount); } } return this; } includeAllTimeSeries(type, timeOrCount) { if (TypeUtil_1.TypeUtil.isNumber(timeOrCount)) { this._includeTimeSeriesByRangeTypeAndCount("", Constants_1.TIME_SERIES.ALL, type, timeOrCount); } else { this._includeTimeSeriesByRangeTypeAndTime("", Constants_1.TIME_SERIES.ALL, type, timeOrCount); } return this; } } exports.SubscriptionIncludeBuilder = SubscriptionIncludeBuilder; //# sourceMappingURL=SubscriptionIncludeBuilder.js.map