Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Upsert.php

function Upsert::key

Sets the unique / primary key field to be used as condition for this query.

Parameters

string $field: The name of the field to set.

Return value

$this

File

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

Class

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

Namespace

Drupal\Core\Database\Query

Code

public function key($field) {
    $this->key = $field;
    return $this;
}
RSS feed
Powered by Drupal