UNPKG

ravendb

Version:
68 lines 1.87 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FacetOptions = exports.FacetResult = exports.FacetValue = void 0; class FacetValue { name; range; count; sum; max; min; average; 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 { name; /** * The facet terms and hits up to a limit of MaxResults items (as specified in the facet setup document), sorted * in TermSortMode order (as indicated in the facet setup document). */ values = []; /** * A list of remaining terms in term sort order for terms that are outside of the MaxResults count. */ remainingTerms = []; /** * The number of remaining terms outside of those covered by the Values terms. */ remainingTermsCount; remainingHits; } exports.FacetResult = FacetResult; class FacetOptions { termSortMode; includeRemainingTerms; start; pageSize; static _defaultOptions = new FacetOptions(); constructor() { this.termSortMode = "ValueAsc"; } static getDefaultOptions() { return this._defaultOptions; } } exports.FacetOptions = FacetOptions; //# sourceMappingURL=index.js.map