You are here

public function Merge::execute in Drupal driver for SQL Server and SQL Azure 3.0.x

Same name and namespace in other branches
  1. 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/Merge.php \Drupal\Driver\Database\sqlsrv\Merge::execute()
  2. 8 drivers/lib/Drupal/Driver/Database/sqlsrv/Merge.php \Drupal\Driver\Database\sqlsrv\Merge::execute()

Executes the merge database query.

Return value

One of the following values:

  • Merge::STATUS_INSERT: If the entry does not already exist, and an INSERT query is executed.
  • Merge::STATUS_UPDATE: If the entry already exists, and an UPDATE query is executed.
  • NULL: (deprecated) If there is a problem and queryOptions['throw_exception'] is FALSE.

Throws

\Drupal\Core\Database\Query\InvalidMergeQueryException When there are no conditions found to merge.

Overrides Merge::execute

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Merge.php, line 15

Class

Merge
Sqlsvr implementation of \Drupal\Core\Database\Query\Merge.

Namespace

Drupal\Driver\Database\sqlsrv

Code

public function execute() {

  // We don't need INSERT or UPDATE queries to trigger additional
  // transactions.
  $this->queryOptions['sqlsrv_skip_transactions'] = TRUE;
  return parent::execute();
}