Upsert.php in Zircon Profile 8
File
core/lib/Drupal/Core/Database/Driver/sqlite/Upsert.php
View source
<?php
namespace Drupal\Core\Database\Driver\sqlite;
use Drupal\Core\Database\Query\Upsert as QueryUpsert;
class Upsert extends QueryUpsert {
public function __toString() {
$comments = $this->connection
->makeComment($this->comments);
$insert_fields = array_merge($this->defaultFields, $this->insertFields);
$query = $comments . 'INSERT OR REPLACE INTO {' . $this->table . '} (' . implode(', ', $insert_fields) . ') VALUES ';
$values = $this
->getInsertPlaceholderFragment($this->insertValues, $this->defaultFields);
$query .= implode(', ', $values);
return $query;
}
}