|
@@ 396-401 (lines=6) @@
|
| 393 |
|
foreach($this->aggregations as $column => $aggregation_type){ |
| 394 |
|
switch($aggregation_type){ |
| 395 |
|
case ColumnAggregationFunction::$aggregation_type_sum: |
| 396 |
|
case ColumnAggregationFunction::$aggregation_type_avg: |
| 397 |
|
if(!isset($result[$column])){ |
| 398 |
|
$result[$column] = 0; |
| 399 |
|
} |
| 400 |
|
$result[$column] += $row[$column]; |
| 401 |
|
break; |
| 402 |
|
case ColumnAggregationFunction::$aggregation_type_min: |
| 403 |
|
if(!isset($result[$column]) || $row[$column] < $result[$column]){ |
| 404 |
|
$result[$column] = $row[$column]; |
|
@@ 402-406 (lines=5) @@
|
| 399 |
|
} |
| 400 |
|
$result[$column] += $row[$column]; |
| 401 |
|
break; |
| 402 |
|
case ColumnAggregationFunction::$aggregation_type_min: |
| 403 |
|
if(!isset($result[$column]) || $row[$column] < $result[$column]){ |
| 404 |
|
$result[$column] = $row[$column]; |
| 405 |
|
} |
| 406 |
|
break; |
| 407 |
|
case ColumnAggregationFunction::$aggregation_type_max: |
| 408 |
|
if(!isset($result[$column]) || $row[$column] > $result[$column]){ |
| 409 |
|
$result[$column] = $row[$column]; |
|
@@ 407-411 (lines=5) @@
|
| 404 |
|
$result[$column] = $row[$column]; |
| 405 |
|
} |
| 406 |
|
break; |
| 407 |
|
case ColumnAggregationFunction::$aggregation_type_max: |
| 408 |
|
if(!isset($result[$column]) || $row[$column] > $result[$column]){ |
| 409 |
|
$result[$column] = $row[$column]; |
| 410 |
|
} |
| 411 |
|
break; |
| 412 |
|
} |
| 413 |
|
} |
| 414 |
|
} |