forUpdate example

    $select->addExpression(':delta', 'delta', [':delta' => 0]);

    // Add all the dynamic field columns.     $or = $select->orConditionGroup();
    foreach ($shared_table_field_columns as $field_column_name => $schema_column_name) {
      $select->addField('entity_table', $schema_column_name$dedicated_table_field_columns[$field_column_name]);
      $or->isNotNull('entity_table.' . $schema_column_name);
    }
    $select->condition($or);

    // Lock the table rows.     $select->forUpdate(TRUE);

    return $select;
  }

  /** * Checks that we are dealing with the correct entity type. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type to be checked. * * @return bool * TRUE if the entity type matches the current one. * * @throws \Drupal\Core\Entity\EntityStorageException */

  public function groupBy($field) {
    $this->query->groupBy($field);
    return $this;
  }

  /** * {@inheritdoc} */
  public function forUpdate($set = TRUE) {
    $this->query->forUpdate($set);
    return $this;
  }

  /** * {@inheritdoc} */
  public function countQuery() {
    return $this->query->countQuery();
  }

  /** * {@inheritdoc} */
Home | Imprint | This part of the site doesn't use cookies.