@azure/cosmos
Version:
Microsoft Azure Cosmos DB Service Node.js SDK for NOSQL API
25 lines • 492 B
JavaScript
/** @hidden */
export 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;
}
}
//# sourceMappingURL=SumAggregator.js.map