You are here

public static function Connection::sqlFunctionLeast in Drupal 10

SQLite compatibility implementation for the LEAST() SQL function.

File

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

Class

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

Namespace

Drupal\sqlite\Driver\Database\sqlite

Code

public static function sqlFunctionLeast() {

  // Remove all NULL, FALSE and empty strings values but leaves 0 (zero) values.
  $values = array_filter(func_get_args(), 'strlen');
  return count($values) < 1 ? NULL : min($values);
}