enumAggregateFunction
enum AggregateFunction: string
Public API: explicitly declared with
@visibility public.The aggregate functions that take one argument, or for COUNT(DISTINCT ...) several, and an optional quantifier.
Each case holds the keyword. STDDEV and STDDEV_POP are the keyword STD, VAR_POP is VARIANCE to the lexer. Source: https://dev.mysql.com/doc/refman/8.4/en/aggregate-functions.html, https://dev.mysql.com/doc/refman/8.4/en/spatial-aggregate-functions.html.
[\SqlSemantics\Platform\MySql\Statement\Call\Aggregate\AggregateFunction::Sum->value, \SqlSemantics\Platform\MySql\Statement\Call\Aggregate\AggregateFunction::Sum->distinctive()] // => ['SUM', true]Cases§
case Average = 'AVG'case BitAnd = 'BIT_AND'case BitOr = 'BIT_OR'case BitXor = 'BIT_XOR'case Count = 'COUNT'case Minimum = 'MIN'case Maximum = 'MAX'case StandardDeviation = 'STD'case Variance = 'VARIANCE'case SampleStandardDeviation = 'STDDEV_SAMP'case SampleVariance = 'VAR_SAMP'case Sum = 'SUM'case JsonArray = 'JSON_ARRAYAGG'case Collect = 'ST_COLLECT'Methods§
public function distinctive(): boolTells whether the grammar accepts DISTINCT for the function.
Returns
boolCalled from 1
Calls 7
- function-call
in_arrayline 41 - class-const AggregateFunction::Average() line 41
- class-const AggregateFunction::Count() line 41
- class-const AggregateFunction::Minimum() line 41
- class-const AggregateFunction::Maximum() line 41
- class-const AggregateFunction::Sum() line 41
- class-const AggregateFunction::Collect() line 41
Test cases 8§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 7
AggregateRuleTest::testAggregateLowersEveryArgumentFormcallsAggregateResultsTest::testAggregateReportsDistinctInAWindowcallsAggregateResultsTest::testAggregateTypesEachFunctioncallsAggregateTest::testAggregatesTellsWhetherTheCallHasNoWindowcallsAggregateTest::testDeriveScalarDerivesTheWindowcallsAggregateTest::testRenderWritesTheQuantifiersAndTheWindowcallsAggregateTest::testStarTellsCountOfAllRowscalls
Relations§
Method calls 1
Constant reads 57
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:41
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:42
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:43
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:44
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:45
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:46
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:47
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:48
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:49
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:50
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:51
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:52
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:53
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:54
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:55
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:56
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:57
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:58
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:59
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:60
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:61
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:62
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:63
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:64
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:65
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:66
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:67
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:68
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:69
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:70
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:71
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:72
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:73
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:74
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:75
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:76
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:77
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:78
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:79
- class-const SqlSemantics\Platform\MySql\Lowering\Call\AggregateRule packages/sql-semantics-mysql/src/Lowering/Call/AggregateRule.php:80
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:53
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:54
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:54
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:55
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:55
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:56
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:56
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:56
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:57
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:57
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:57
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:58
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:59
- class-const SqlSemantics\Platform\MySql\Rules\Call\AggregateResults::aggregate() packages/sql-semantics-mysql/src/Rules/Call/AggregateResults.php:60
- class-const SqlSemantics\Platform\MySql\Statement\Call\Aggregate\Aggregate::__construct() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/Aggregate.php:65
- class-const SqlSemantics\Platform\MySql\Statement\Call\Aggregate\Aggregate::__construct() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/Aggregate.php:66
- class-const SqlSemantics\Platform\MySql\Statement\Call\Aggregate\Aggregate::__construct() packages/sql-semantics-mysql/src/Statement/Call/Aggregate/Aggregate.php:68