You are here

public static function Connection::sqlFunctionIf in Drupal 10

SQLite compatibility implementation for the IF() SQL function.

File

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

Class

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

Namespace

Drupal\sqlite\Driver\Database\sqlite

Code

public static function sqlFunctionIf($condition, $expr1, $expr2 = NULL) {
  return $condition ? $expr1 : $expr2;
}