@configurator/ravendb
Version:
RavenDB client for Node.js
46 lines • 1.3 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FacetOptions = exports.FacetResult = exports.FacetValue = void 0;
class FacetValue {
toString() {
return FacetValue.toString(this);
}
static toString(facetVal) {
let msg = facetVal.range + " - Count: " + facetVal.count + ", ";
if (facetVal.sum) {
msg += "Sum: " + facetVal.sum + ",";
}
if (facetVal.max) {
msg += "Max: " + facetVal.max + ",";
}
if (facetVal.min) {
msg += "Min: " + facetVal.min + ",";
}
if (facetVal.average) {
msg += "Average: " + facetVal.average + ",";
}
if (facetVal.name) {
msg += "Name: " + facetVal.name + ",";
}
return msg.replace(/;$/, "");
}
}
exports.FacetValue = FacetValue;
class FacetResult {
constructor() {
this.values = [];
this.remainingTerms = [];
}
}
exports.FacetResult = FacetResult;
class FacetOptions {
constructor() {
this.termSortMode = "ValueAsc";
}
static getDefaultOptions() {
return this._defaultOptions;
}
}
exports.FacetOptions = FacetOptions;
FacetOptions._defaultOptions = new FacetOptions();
//# sourceMappingURL=index.js.map