Connection::sqlFunctionConcatWs

public static Connection::sqlFunctionConcatWs()

SQLite compatibility implementation for the CONCAT_WS() SQL function.

See also

http://dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_co...

File

core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php, line 226

Class

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

Namespace

Drupal\Core\Database\Driver\sqlite

Code

public static function sqlFunctionConcatWs() {
  $args = func_get_args();
  $separator = array_shift($args);
  // If the separator is NULL, the result is NULL.
  if ($separator === FALSE || is_null($separator)) {
    return NULL;
  }
  // Skip any NULL values after the separator argument.
  $args = array_filter($args, function($value) {
    return !is_null($value);
  });
  return implode($separator, $args);
}
doc_Drupal
2016-10-29 08:56:01
Comments
Leave a Comment

Please login to continue.