Merge::STATUS_INSERT

Returned by execute() if an INSERT query has been executed. File core/lib/Drupal/Core/Database/Query/Merge.php, line 53 Class Merge General class for an abstracted MERGE query operation. Namespace Drupal\Core\Database\Query Code const STATUS_INSERT = 1;

Merge::keys

public Merge::keys(array $fields, array $values = array()) Sets the key fields to be used as conditions for this query. This method should only be called once. It may be called either with a single associative array or two indexed arrays. If called with an associative array, the keys are taken to be the fields and the values are taken to be the corresponding values to set. If called with two arrays, the first array is taken as the fields and the second array is taken as the corresponding values

Merge::key

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. Parameters string $field: The name of the field to set. mixed $value: The value to set into the database. Return value $this See also \Drupal\Core\Database\Query\Merge::keys() File core/lib/Drupal/Core/Database/Query/Merge.php, line 329 Class Merge General cla

Merge::insertFields

public Merge::insertFields(array $fields, array $values = array()) Adds a set of field->value pairs to be inserted. Parameters $fields: An array of fields on which to insert. This array may be indexed or associative. If indexed, the array is taken to be the list of fields. If associative, the keys of the array are taken to be the fields and the values are taken to be corresponding values to insert. If a $values argument is provided, $fields must be indexed. $values: An array of fields to in

Merge::fields

public Merge::fields(array $fields, array $values = array()) Sets common field-value pairs in the INSERT and UPDATE query parts. This method should only be called once. It may be called either with a single associative array or two indexed arrays. If called with an associative array, the keys are taken to be the fields and the values are taken to be the corresponding values to set. If called with two arrays, the first array is taken as the fields and the second array is taken as the correspondi

Merge::expression

public Merge::expression($field, $expression, array $arguments = NULL) Specifies fields to be updated as an expression. Expression fields are cases such as counter = counter + 1. This method takes precedence over MergeQuery::updateFields() and it's wrappers, MergeQuery::key() and MergeQuery::fields(). Parameters $field: The field to set. $expression: The field will be set to the value of this expression. This parameter may include named placeholders. $arguments: If specified, this is an array

Merge::execute

public Merge::execute() Runs the query against the database. Return value \Drupal\Core\Database\StatementInterface|null A prepared statement, or NULL if the query is not valid. Overrides Query::execute File core/lib/Drupal/Core/Database/Query/Merge.php, line 352 Class Merge General class for an abstracted MERGE query operation. Namespace Drupal\Core\Database\Query Code public function execute() { // Default options for merge queries. $this->queryOptions += array( 'throw_exc

Merge::conditionTable

protected Merge::conditionTable($table) Sets the table or subquery to be used for the condition. Parameters $table: The table name or the subquery to be used. Use a Select query object to pass in a subquery. Return value \Drupal\Core\Database\Query\Merge The called object. File core/lib/Drupal/Core/Database/Query/Merge.php, line 152 Class Merge General class for an abstracted MERGE query operation. Namespace Drupal\Core\Database\Query Code protected function conditionTable($table) {

Merge::$updateFields

An array of fields that will be updated. Type: array File core/lib/Drupal/Core/Database/Query/Merge.php, line 100 Class Merge General class for an abstracted MERGE query operation. Namespace Drupal\Core\Database\Query Code protected $updateFields = array();

Merge::$table

The table to be used for INSERT and UPDATE. Type: string File core/lib/Drupal/Core/Database/Query/Merge.php, line 65 Class Merge General class for an abstracted MERGE query operation. Namespace Drupal\Core\Database\Query Code protected $table;