execute

  1. drupal
    1. drupal7
Versionen
drupal7 public UpdateQuery_sqlite::execute()

Verwandte Themen

Code

includes/database/sqlite/query.inc, line 80

<?php
public function execute() {
  // Get the fields used in the update query, and remove those that are already
  // in the condition.
  $fields = $this->expressionFields + $this->fields;
  $this->removeFieldsInCondition($fields, $this->condition);

  // Add the inverse of the fields to the condition.
  $condition = new DatabaseCondition('OR');
  foreach ($fields as $field => $data) {
    if (is_array($data)) {
      // The field is an expression.
      $condition->condition($field, $data['expression'], '<>');
      // The IS NULL operator is badly managed by DatabaseCondition.
      $condition->where($field . ' IS NULL');
    }
    elseif (is_null($data)) {
      // The field will be set to NULL.
      // The IS NULL operator is badly managed by DatabaseCondition.
      $condition->where($field . ' IS NOT NULL');
    }
    else {
      $condition->condition($field, $data, '<>');
      // The IS NULL operator is badly managed by DatabaseCondition.
      $condition->where($field . ' IS NULL');
    }
  }
  if (count($condition)) {
    $condition->compile($this->connection);
    $this->condition->where((string) $condition, $condition->arguments());
  }
  return parent::execute();
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen