Database.aggregate() method
Home > @direct-sqlite/core > Database > aggregate
Database.aggregate() method
Section titled “Database.aggregate() method”Hooks up custom metric calculations that aggregate state step-by-step across matching rows.
Signature:
aggregate(name: string, options: { start: any; step: (acc: any, next: any) => any; result?: (acc: any) => any; }): this;Parameters
Section titled “Parameters”|
Parameter |
Type |
Description |
|---|---|---|
|
name |
string |
The name of the aggregate function to register. |
|
options |
{ start: any; step: (acc: any, next: any) => any; result?: (acc: any) => any; } |
Aggregate function options to register. |
Returns:
this