ravendb
Version:
RavenDB client for Node.js
54 lines • 2.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SubscriptionIncludeBuilder = void 0;
const IncludeBuilderBase_js_1 = require("./IncludeBuilderBase.js");
const TypeUtil_js_1 = require("../../../Utility/TypeUtil.js");
const Constants_js_1 = require("../../../Constants.js");
class SubscriptionIncludeBuilder extends IncludeBuilderBase_js_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_js_1.TypeUtil.isArray(nameOrNames)) {
if (TypeUtil_js_1.TypeUtil.isNumber(timeOrCount)) {
this._includeArrayOfTimeSeriesByRangeTypeAndCount(nameOrNames, type, timeOrCount);
}
else { // names + time
this._includeArrayOfTimeSeriesByRangeTypeAndTime(nameOrNames, type, timeOrCount);
}
}
else { // name
if (TypeUtil_js_1.TypeUtil.isNumber(timeOrCount)) {
this._includeTimeSeriesByRangeTypeAndCount("", nameOrNames, type, timeOrCount);
}
else { // name + time
this._includeTimeSeriesByRangeTypeAndTime("", nameOrNames, type, timeOrCount);
}
}
return this;
}
includeAllTimeSeries(type, timeOrCount) {
if (TypeUtil_js_1.TypeUtil.isNumber(timeOrCount)) {
this._includeTimeSeriesByRangeTypeAndCount("", Constants_js_1.TIME_SERIES.ALL, type, timeOrCount);
}
else {
this._includeTimeSeriesByRangeTypeAndTime("", Constants_js_1.TIME_SERIES.ALL, type, timeOrCount);
}
return this;
}
}
exports.SubscriptionIncludeBuilder = SubscriptionIncludeBuilder;
//# sourceMappingURL=SubscriptionIncludeBuilder.js.map