You are here

protected static function CleanerMySqlOptimizationController::getOptimizationQuery in Cleaner 8

Build the optimization query string.

Parameters

int $opt: Operation flag.

array $list: Tables list array.

Return value

string Optimization query string.

1 call to CleanerMySqlOptimizationController::getOptimizationQuery()
CleanerMySqlOptimizationController::mysqlOptimize in src/Controller/CleanerMySqlOptimizationController.php
MySQL optimizer.

File

src/Controller/CleanerMySqlOptimizationController.php, line 130

Class

CleanerMySqlOptimizationController
Class CleanerMySqlOptimizationController.

Namespace

Drupal\cleaner\Controller

Code

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