You are here

protected static function CleanerMysqlOptimizeEventSubscriber::getOptimizationQuery in Cleaner 8.2

Build the optimization query string.

Parameters

int $opt: Operation flag.

array $list: Tables list array.

Return value

string Optimization query string.

1 call to CleanerMysqlOptimizeEventSubscriber::getOptimizationQuery()
CleanerMysqlOptimizeEventSubscriber::optimizeMysql in src/EventSubscriber/CleanerMysqlOptimizeEventSubscriber.php
Cleaner MySQL optimization.

File

src/EventSubscriber/CleanerMysqlOptimizeEventSubscriber.php, line 163

Class

CleanerMysqlOptimizeEventSubscriber
Class CleanerMysqlOptimizeEventSubscriber.

Namespace

Drupal\cleaner\EventSubscriber

Code

protected static function getOptimizationQuery($opt, $list) {
  $query = 'OPTIMIZE ' . ($opt == 2 ? 'LOCAL ' : '');
  $query .= 'TABLE {' . implode('}, {', $list) . '}';
  return $query;
}