Executes an array of updates.

@param $updates \Acquia\Blt\Annotations\Update[]
177598
public function executeUpdates($updates) {
    /** @var Updates $updates_object */
    $updates_object = new $this->updateClassName($this);
    $this->output->writeln("Executing updates...");

    /**
     * @var string $method_name
     * @var Update $update
     */
    foreach ($updates as $method_name => $update) {
      $this->output->writeln("-> $method_name: {$update->description}");
      call_user_func([$updates_object, $method_name]);
    }
  }
538999
final public function update(array $keys = null)
    {
        $pre = $this->preUpdate($keys);
        if ($pre === false) {
            $this->logger->error(sprintf(
                'Can not update object "%s:%s"; cancelled by %s::preUpdate()',
                $this->objType(),
                $this->id(),
                get_called_class()
            ));
            return false;
        }

        $ret = $this->source()->updateItem($this, $keys);
        if ($ret === false) {
            $this->logger->error(sprintf(
                'Can not update object "%s:%s"; repository failed for %s',
                $this->objType(),
                $this->id(),
                get_called_class()
            ));
            return false;
        }

        $post = $this->postUpdate($keys);
        if ($post === false) {
            $this->logger->warning(sprintf(
                'Updated object "%s:%s" but %s::postUpdate() failed',
                $this->objType(),
                $this->id(),
                get_called_class()
            ));
            return false;
        }

        return true;
    }
16836
public function isUpdate($update = true, $where = null)
    {
        if (is_bool($update)) {
            $this->exists = $update;

            if (!empty($where)) {
                $this->updateWhere = $where;
            }
        } else {
            $this->exists      = true;
            $this->updateWhere = $update;
        }

        return $this;
    }
213590
public function update(array $values)
	{
		$bindings = array_values(array_merge($values, $this->bindings));

		$sql = $this->grammar->compileUpdate($this, $values);

		return $this->connection->update($sql, $this->cleanBindings($bindings));
	}
544261
public function update(Collection $updates)
    {
        foreach ($updates as $update) {
            $entry = $this->table('telescope_entries')
                            ->where('uuid', $update->uuid)
                            ->where('type', $update->type)
                            ->first();

            if (! $entry) {
                continue;
            }

            $content = json_encode(array_merge(
                json_decode($entry->content, true) ?: [], $update->changes
            ));

            $this->table('telescope_entries')
                            ->where('uuid', $update->uuid)
                            ->where('type', $update->type)
                            ->update(['content' => $content]);

            $this->updateTags($update);
        }
    }
1267884
public function execute($params = array())
    {
        $this->mergeParams($params);

        $reconnect = $this->db->getOption('reconnect');
        $reconnectRetries = $this->db->getOption('reconnect_retries', 3);
        $reconnectDelayMS = $this->db->getOption('reconnect_delay_ms', 1000);

        while (true) {
            $e = null;
            $errorCode = null;
            $errorInfo = null;
            $result = null;

            $isReconnectError = false;
            try {
                $this->prepare();
                foreach ($this->positionParams as $index => $value) {
                    $this->statement->bindValue($index + 1, $value);
                }

                $result = $this->statement->execute($this->params?:null);
            } catch (\Exception $e) {
            }

            if ($result === false || !$e) {
                $errorCode = $this->statement->errorCode();
                $errorInfo = $this->statement->errorInfo();
            }

            $isReconnectError = Util::checkReconnectError($errorCode, $errorInfo, $e);

            // reconnect
            if ($reconnect && $isReconnectError && $reconnectRetries > 0) {
                $reconnectRetries--;
                $this->statement = null;
                $this->db->close();
                $reconnectDelayMS && usleep($reconnectDelayMS * 1000);
                continue;
            }

            break;
        }

        if ($e) {
            $this->db->logError(sprintf('Statement exception error #%s: %s', $e->getCode(), $e->getMessage()));
            throw $e;
        }

        if ($result === false) {
            $this->db->logError(sprintf('Statement execute error #%s: %s', $errorInfo[0], $errorInfo[2]));
            return false;
        }

        return $this->statement->rowCount();
    }
110377
public void addUpdate(final Update update) {
        if (updates == null) {
            updates = new ArrayList<Update>();
        }
        updates.add(update);
    }
429510
public function update(array $values)
    {
        $result = parent::update($values);

        $this->handler->setBuilder($this)
            ->invalidateQuery(Reflector::QUERY_TYPE_UPDATE, $values);

        return $result;
    }
1005422
public function update($models)
    {
        if (! $this->shouldMaintainIndex($models->first())) {
            return;
        }

        foreach ($models as $model) {
            $this->performUpdate($model);
        }
    }
983191
public function update(array $fields = [])
    {
        $connection = $this->getConnection();

        $this->beforeUpdateInternal();

        $connection->beginTransaction();
        try {
            if ($updated = $this->updateInternal($fields)) {
                $connection->commit();
            } else {
                $connection->rollBack();
            }
        } catch (Exception $e) {
            $connection->rollBack();
            throw $e;
        }

        $this->afterUpdateInternal();

        if ($updated) {
            $this->updateRelated();
            $this->attributes->resetOldAttributes();
        }

        return $updated;
    }
280047
public function update($opts = ['prod' => false])
    {
        $prod = isset($opts['prod']) && $opts['prod'] ? true : false;
        $this->info('Updating project dependencies');
        $this->composerUpdate(['prod' => $prod]);
        $this->info('Project dependencies updated');
    }
631532
protected function perform_update_metadata( array $changes ) {
		if ( ! $this->meta_type ) {
			return;
		}

		$mapping = $this->get_mapping();

		$changes = $this->recently_created
			? array_keys( $mapping )
			: $this->get_changes_only( $changes, array_keys( $mapping ) );

		// Don't do anything if nothing changes.
		if ( empty( $changes ) ) {
			return;
		}

		$updated = [];
		foreach ( $changes as $attribute ) {
			$meta_key = $this->get_mapping_metakey( $attribute );
			if ( is_null( $meta_key ) ) {
				continue;
			}

			if ( $this->update_meta( $meta_key, $this->get_attribute( $attribute ) ) ) {
				$updated[] = $attribute;
			}
		}

		return $updated;
	}
209528
public function update($update, $alias = null)
    {
        $this->type = self::UPDATE;

        $this->from($update, $alias);

        return $this;
    }
168742
public function setReleases($releases)
    {
        if (!is_array($releases)) {
            throw new \Exception("The releases parameter must be an array.");
        }
        if (isset($this->currentRelease)) {
            if (!isset($releases[$this->currentRelease['version']])) {
                unset($this->currentRelease);
            }
            else {
                // Make sure the info about the current release is updated properly.
                $this->currentRelease = $releases[$this->currentRelease['version']];
            }
        }
        $this->releases = $releases;
    }
142667
public function update(array $values)
    {
        // update timestamps
        $values = $this->addUpdatedAtColumn($values);

        // get version values & values
        $versionValues = $this->getVersionValues($values);
        $values = $this->getValues($values);

        // get records
        $affectedRecords = $this->getAffectedRecords();

        // update main table records
        if (! $this->query->increment($this->model->getLatestVersionColumn(), 1, $values)) {
            return false;
        }

        // update version table records
        $db = $this->model->getConnection();
        foreach ($affectedRecords as $record) {
            // get versioned values from record
            foreach($this->model->getVersionedAttributeNames() as $key) {
                $recordVersionValues[$key] = (isset($versionValues[$key])) ? $versionValues[$key] : $record->{$key};
            }

            // merge versioned values from record and input
            $recordVersionValues = array_merge($recordVersionValues, $versionValues);

            // set version and ref_id
            $recordVersionValues[$this->model->getVersionKeyName()] = $record->{$this->model->getKeyName()};
            $recordVersionValues[$this->model->getVersionColumn()] = $record->{$this->model->getLatestVersionColumn()}+1;

            // insert new version
            if(! $db->table($this->model->getVersionTable())->insert($recordVersionValues)) {
                return false;
            }
        }

        // fill the latest version value
        $this->model->{$this->model->getLatestVersionColumn()} += 1;

        return true;
    }
471883
public function update(array $items = [])
    {
        foreach ($items as $key => $item) {
            $this->set($key, $item);
        }
    }
1237570
public function update(array $values)
    {
        if (!$this->hasId()) {
            throw new UpdateException('ID not set - did you call find($id) before update($values)?');
        }

        if (!$this->isUpdatable()) {
            throw new UpdateException('Permission denied: Entity can not be updated');
        }

        $this->transactional(function () use ($values) {
            $this->forceUpdate($values);
        });

        return $this;
    }