You are here

public function Delete::execute in Drupal 8

Same name in this branch
  1. 8 core/lib/Drupal/Core/Database/Query/Delete.php \Drupal\Core\Database\Query\Delete::execute()
  2. 8 core/lib/Drupal/Core/Database/Driver/pgsql/Delete.php \Drupal\Core\Database\Driver\pgsql\Delete::execute()
Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Database/Query/Delete.php \Drupal\Core\Database\Query\Delete::execute()

Executes the DELETE query.

Return value

int The number of rows affected by the delete query.

Overrides Query::execute

1 call to Delete::execute()
Delete::execute in core/lib/Drupal/Core/Database/Driver/pgsql/Delete.php
Executes the DELETE query.
1 method overrides Delete::execute()
Delete::execute in core/lib/Drupal/Core/Database/Driver/pgsql/Delete.php
Executes the DELETE query.

File

core/lib/Drupal/Core/Database/Query/Delete.php, line 48

Class

Delete
General class for an abstracted DELETE operation.

Namespace

Drupal\Core\Database\Query

Code

public function execute() {
  $values = [];
  if (count($this->condition)) {
    $this->condition
      ->compile($this->connection, $this);
    $values = $this->condition
      ->arguments();
  }
  return $this->connection
    ->query((string) $this, $values, $this->queryOptions);
}