public Merge::key($field, $value = NULL)
Sets a single key field to be used as condition for this query.
Same as \Drupal\Core\Database\Query\Merge::keys() but offering a signature that is more natural for the case of a single key.
string $field: The name of the field to set.
mixed $value: The value to set into the database.
$this
\Drupal\Core\Database\Query\Merge::keys()
public function key($field, $value = NULL) { // @todo D9: Remove this backwards-compatibility shim. if (is_array($field)) { $this->keys($field, isset($value) ? $value : array()); } else { $this->keys(array($field => $value)); } return $this; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Query!Merge.php/function/Merge::key/8.1.x