(
selectedCellId: Id,
aggregate: 'count' | 'sum' | 'avg' | 'min' | 'max' | Aggregate,
aggregateAdd?: AggregateAdd,
aggregateRemove?: AggregateRemove,
aggregateReplace?: AggregateReplace,
)
| 466 | ); |
| 467 | |
| 468 | const group = ( |
| 469 | selectedCellId: Id, |
| 470 | aggregate: 'count' | 'sum' | 'avg' | 'min' | 'max' | Aggregate, |
| 471 | aggregateAdd?: AggregateAdd, |
| 472 | aggregateRemove?: AggregateRemove, |
| 473 | aggregateReplace?: AggregateReplace, |
| 474 | ) => { |
| 475 | const groupEntry: [Id, GroupClause] = [ |
| 476 | selectedCellId, |
| 477 | [ |
| 478 | selectedCellId, |
| 479 | isFunction(aggregate) |
| 480 | ? [aggregate, aggregateAdd, aggregateRemove, aggregateReplace] |
| 481 | : ((mapGet( |
| 482 | numericAggregators, |
| 483 | aggregate as Id, |
| 484 | ) as Aggregators) ?? [(_cells, length) => length]), |
| 485 | ], |
| 486 | ]; |
| 487 | arrayPush(groupEntries, groupEntry); |
| 488 | return {as: (groupedCellId: Id) => (groupEntry[0] = groupedCellId)}; |
| 489 | }; |
| 490 | |
| 491 | const having = ( |
| 492 | arg1: Id | ((getSelectedOrGroupedCell: GetCell) => boolean), |
no test coverage detected
searching dependent graphs…