3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
12 namespace Civi\Api4\Query
;
17 class SqlFunctionCOUNT
extends SqlFunction
{
19 protected static $category = self
::CATEGORY_AGGREGATE
;
21 protected static $params = [
23 'prefix' => ['', 'DISTINCT', 'ALL'],
25 'must_be' => ['SqlField', 'SqlWild'],
31 * Reformat result as integer
33 * @see \Civi\Api4\Utils\FormattingUtil::formatOutputValues
34 * @param string $value
35 * @param string $dataType
36 * @return string|array
38 public function formatOutputValue($value, &$dataType) {
39 // Count is always an integer
40 $dataType = 'Integer';
47 public static function getTitle(): string {