UNPKG

ravendb

Version:
50 lines 1.8 kB
import { IncludeBuilderBase } from "./IncludeBuilderBase.js"; import { TypeUtil } from "../../../Utility/TypeUtil.js"; import { TIME_SERIES } from "../../../Constants.js"; export class SubscriptionIncludeBuilder extends 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.isArray(nameOrNames)) { if (TypeUtil.isNumber(timeOrCount)) { this._includeArrayOfTimeSeriesByRangeTypeAndCount(nameOrNames, type, timeOrCount); } else { // names + time this._includeArrayOfTimeSeriesByRangeTypeAndTime(nameOrNames, type, timeOrCount); } } else { // name if (TypeUtil.isNumber(timeOrCount)) { this._includeTimeSeriesByRangeTypeAndCount("", nameOrNames, type, timeOrCount); } else { // name + time this._includeTimeSeriesByRangeTypeAndTime("", nameOrNames, type, timeOrCount); } } return this; } includeAllTimeSeries(type, timeOrCount) { if (TypeUtil.isNumber(timeOrCount)) { this._includeTimeSeriesByRangeTypeAndCount("", TIME_SERIES.ALL, type, timeOrCount); } else { this._includeTimeSeriesByRangeTypeAndTime("", TIME_SERIES.ALL, type, timeOrCount); } return this; } } //# sourceMappingURL=SubscriptionIncludeBuilder.js.map