3 namespace Drupal\Core\Database\Driver\sqlite;
5 use Drupal\Core\Database\Query\Truncate as QueryTruncate;
8 * SQLite implementation of \Drupal\Core\Database\Query\Truncate.
10 * SQLite doesn't support TRUNCATE, but a DELETE query with no condition has
11 * exactly the effect (it is implemented by DROPing the table).
13 class Truncate extends QueryTruncate {
15 public function __toString() {
16 // Create a sanitized comment string to prepend to the query.
17 $comments = $this->connection->makeComment($this->comments);
19 return $comments . 'DELETE FROM {' . $this->connection->escapeTable($this->table) . '} ';