Upsert::$updateExpressions

Same name and namespace in other branches
  1. main core/lib/Drupal/Core/Database/Query/Upsert.php \Drupal\Core\Database\Query\Upsert::updateExpressions

Explicit updates to be done in case of insert failure.

If the insert part of the upsert fails, the default behavior is to update the existing record with the values passed in. However, in some cases you may want to see what is the value of a column of the existing record, and manipulate that - typically, counters or the like. This array contains such overrides.

Type: array

File

core/lib/Drupal/Core/Database/Query/Upsert.php, line 36

Class

Upsert
General class for an abstracted "Upsert" (UPDATE or INSERT) query operation.

Namespace

Drupal\Core\Database\Query

Code

protected array $updateExpressions = [];

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.