SQLite specific implementation of DeleteQuery.
When the WHERE is omitted from a DELETE statement and the table being deleted has no triggers, SQLite uses an optimization to erase the entire table content without having to visit each row of the table individually.
Prior to SQLite 3.6.5, SQLite does not return the actual number of rows deleted by that optimized "truncate" optimization.
Expanded class hierarchy of Delete
class Delete extends QueryDelete {
public function execute() {
if (!count($this->condition)) {
$total_rows = $this->connection
->query('SELECT COUNT(*) FROM {' . $this->connection
->escapeTable($this->table) . '}')
->fetchField();
parent::execute();
return $total_rows;
}
else {
return parent::execute();
}
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Delete:: |
protected | property | The condition object for this query. | |
Delete:: |
protected | property | The table from which to delete. | |
Delete:: |
public | function |
Implements Drupal\Core\Database\Query\ConditionInterface::arguments(). Overrides ConditionInterface:: |
|
Delete:: |
public | function |
Implements Drupal\Core\Database\Query\ConditionInterface::compile(). Overrides ConditionInterface:: |
|
Delete:: |
public | function |
Implements Drupal\Core\Database\Query\ConditionInterface::compiled(). Overrides ConditionInterface:: |
|
Delete:: |
public | function |
Implements Drupal\Core\Database\Query\ConditionInterface::condition(). Overrides ConditionInterface:: |
|
Delete:: |
public | function |
Implements Drupal\Core\Database\Query\ConditionInterface::conditions(). Overrides ConditionInterface:: |
|
Delete:: |
public | function |
Executes the DELETE query. Overrides Delete:: |
|
Delete:: |
public | function |
Implements Drupal\Core\Database\Query\ConditionInterface::exists(). Overrides ConditionInterface:: |
|
Delete:: |
public | function |
Implements Drupal\Core\Database\Query\ConditionInterface::isNotNull(). Overrides ConditionInterface:: |
|
Delete:: |
public | function |
Implements Drupal\Core\Database\Query\ConditionInterface::isNull(). Overrides ConditionInterface:: |
|
Delete:: |
public | function |
Implements Drupal\Core\Database\Query\ConditionInterface::notExists(). Overrides ConditionInterface:: |
|
Delete:: |
public | function |
Implements Drupal\Core\Database\Query\ConditionInterface::where(). Overrides ConditionInterface:: |
|
Delete:: |
public | function |
Constructs a Delete object. Overrides Query:: |
|
Delete:: |
public | function |
Implements PHP magic __toString method to convert the query to a string. Overrides Query:: |
|
Query:: |
protected | property | An array of comments that can be prepended to a query. | |
Query:: |
protected | property | The connection object on which to run this query. | |
Query:: |
protected | property | The key of the connection object. | |
Query:: |
protected | property | The target of the connection object. | |
Query:: |
protected | property | The placeholder counter. | |
Query:: |
protected | property | The query options to pass on to the connection object. | |
Query:: |
protected | property | A unique identifier for this query object. | |
Query:: |
public | function | Adds a comment to the query. | |
Query:: |
public | function | Returns a reference to the comments array for the query. | |
Query:: |
public | function |
Gets the next placeholder value for this query object. Overrides PlaceholderInterface:: |
|
Query:: |
public | function |
Returns a unique identifier for this object. Overrides PlaceholderInterface:: |
|
Query:: |
public | function | Implements the magic __clone function. | 1 |
Query:: |
public | function | Implements the magic __sleep function to disconnect from the database. | |
Query:: |
public | function | Implements the magic __wakeup function to reconnect to the database. |