UNPKG

ravendb

Version:
44 lines 1.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CounterIncludesToken = void 0; const QueryToken_js_1 = require("./QueryToken.js"); class CounterIncludesToken extends QueryToken_js_1.QueryToken { _sourcePath; _counterName; _all; constructor(sourcePath, counterName, all) { super(); this._counterName = counterName; this._all = all; this._sourcePath = sourcePath; } static create(sourcePath, counterName) { return new CounterIncludesToken(sourcePath, counterName, false); } static all(sourcePath) { return new CounterIncludesToken(sourcePath, null, true); } addAliasToPath(alias) { this._sourcePath = !this._sourcePath ? alias : alias + "." + this._sourcePath; } writeTo(writer) { writer.append("counters("); if (this._sourcePath) { writer.append(this._sourcePath); if (!this._all) { writer.append(", "); } } if (!this._all) { writer .append("'") .append(this._counterName) .append("'"); } writer.append(")"); } } exports.CounterIncludesToken = CounterIncludesToken; //# sourceMappingURL=CounterIncludesToken.js.map