You are here

protected function TemporaryFilesUsagesSensorPlugin::addAggregateExpression in Monitoring 8

Adds the aggregate expression to the select query.

Parameters

\Drupal\Core\Database\Query\SelectInterface $select: The database select query.

Overrides DatabaseAggregatorSensorPlugin::addAggregateExpression

File

src/Plugin/monitoring/SensorPlugin/TemporaryFilesUsagesSensorPlugin.php, line 60

Class

TemporaryFilesUsagesSensorPlugin
Monitors temporary files usages.

Namespace

Drupal\monitoring\Plugin\monitoring\SensorPlugin

Code

protected function addAggregateExpression(SelectInterface $select) {
  $select
    ->addExpression('COUNT(DISTINCT file_managed.fid)', 'records_count');
}