You are here

public static function Connection::sqlFunctionGreatest in Drupal 10

SQLite compatibility implementation for the GREATEST() SQL function.

File

core/modules/sqlite/src/Driver/Database/sqlite/Connection.php, line 231

Class

Connection
SQLite implementation of \Drupal\Core\Database\Connection.

Namespace

Drupal\sqlite\Driver\Database\sqlite

Code

public static function sqlFunctionGreatest() {
  $args = func_get_args();
  foreach ($args as $v) {
    if (!isset($v)) {
      unset($args);
    }
  }
  if (count($args)) {
    return max($args);
  }
  else {
    return NULL;
  }
}