@azure/cosmos
Version:
Microsoft Azure Cosmos DB Service Node.js SDK for NOSQL API
29 lines • 633 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SumAggregator = void 0;
/** @hidden */
class SumAggregator {
sum;
/**
* Add the provided item to aggregation result.
*/
aggregate(other) {
if (other === undefined) {
return;
}
if (this.sum === undefined) {
this.sum = other;
}
else {
this.sum += other;
}
}
/**
* Get the aggregation result.
*/
getResult() {
return this.sum;
}
}
exports.SumAggregator = SumAggregator;
//# sourceMappingURL=SumAggregator.js.map