* The raw expression, minus the alias.
* @var string
*/
- protected $expr = '';
+ public $expr = '';
+
+ /**
+ * Whether or not pseudoconstant suffixes should be evaluated during output.
+ *
+ * @var bool
+ * @see \Civi\Api4\Utils\FormattingUtil::formatOutputValues
+ */
+ public $supportsExpansion = FALSE;
/**
* SqlFunction constructor.
return $this->alias ?? $this->fields[0] ?? \CRM_Utils_String::munge($this->expr);
}
+ /**
+ * Returns the name of this sql expression class.
+ *
+ * @return string
+ */
+ public function getType(): string {
+ $className = get_class($this);
+ return substr($className, strrpos($className, '\\') + 1);
+ }
+
}