Пример #1
0
 /**
  * Implements QueryConditionInterface::isNull().
  */
 public function isNull($field)
 {
     $this->condition->isNull($field);
     return $this;
 }
Пример #2
0
 public function execute()
 {
     if (!empty($this->queryOptions['sqlite_return_matched_rows'])) {
         return parent::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->where($field . ' <> ' . $data['expression']);
             $condition->isNull($field);
         } elseif (!isset($data)) {
             // The field will be set to NULL.
             $condition->isNull($field);
         } else {
             $condition->condition($field, $data, '<>');
             $condition->isNull($field);
         }
     }
     if (count($condition)) {
         $condition->compile($this->connection, $this);
         $this->condition->where((string) $condition, $condition->arguments());
     }
     return parent::execute();
 }
Пример #3
0
 public function havingIsNull($field)
 {
     $this->having->isNull($field);
     return $this;
 }