Store the given entry updates.

@param  \Illuminate\Support\Collection|\Laravel\Telescope\EntryUpdate[]  $updates
@return void
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);
        }
    }
937075
protected function insert_event_entries($evententries) {
        if (!$this->init()) {
            return;
        }
        if (!$dbtable = $this->get_config('dbtable')) {
            return;
        }
        try {
            $this->extdb->insert_records($dbtable, $evententries);
        } catch (\moodle_exception $e) {
            debugging('Cannot write to external database: ' . $e->getMessage(), DEBUG_DEVELOPER);
        }
    }
1306583
protected function prepareUpdate(array $updates, $oneToOneRelation = false)
    {
        $prepared = [];

        foreach ($this->builder->fields() as $field) {
            $columns = $field->column();

            // If column not in input array data, then continue.
            if (!array_has($updates, $columns)) {
                continue;
            }

            if ($this->invalidColumn($columns, $oneToOneRelation)) {
                continue;
            }

            $value = $this->getDataByColumn($updates, $columns);

            $value = $field->prepare($value);

            if (is_array($columns)) {
                foreach ($columns as $name => $column) {
                    array_set($prepared, $column, $value[$name]);
                }
            } elseif (is_string($columns)) {
                array_set($prepared, $columns, $value);
            }
        }

        return $prepared;
    }
217295
private function _store_update( $update, $store = true, $plugin_id = false ) {
            $this->_logger->entrance();

            if ( $update instanceof FS_Plugin_Tag ) {
                $update->updated = time();
            }

            if ( ! is_numeric( $plugin_id ) ) {
                $plugin_id = $this->_plugin->id;
            }

            $updates               = self::get_all_updates();
            $updates[ $plugin_id ] = $update;
            self::$_accounts->set_option( 'updates', $updates, $store );
        }
852092
public function persistBulk($documents)
    {
        if (empty($documents)) {
            $this->log('No more documents to index', 'info');
            return;
        }
        $this->log(sprintf('Indexing %d documents', count($documents)), 'info');
        ConnectionManager::get('auditlog_elastic')->addDocuments($documents);
    }
922966
function store( $fieldFilters = null )
    {
        $db = eZDB::instance();

        $db->begin();
        parent::store( $fieldFilters );
        $this->updateAndStoreModified();
        $db->commit();
    }
391896
public function updateModels(Models $models)
    {
        foreach ($models as $model) {
            if ($model->isSoftDeleted()) {
                $this->dispatchBeforeEvent($model, Event::DELETE);
            } else {
                $this->dispatchBeforeEvent($model, Event::UPDATE);
                $this->dispatchBeforeEvent($model, Event::SAVE);
            }
        }

        $this->updateAll()->executeModels($models);

        foreach ($models as $model) {

            $model->resetOriginals();

            if ($model->isSoftDeleted()) {
                $this->dispatchAfterEvent($model, Event::DELETE);
            } else {
                $this->dispatchAfterEvent($model, Event::UPDATE);
                $this->dispatchAfterEvent($model, Event::SAVE);
            }
        }

        return $this;
    }
1302251
protected function flushCache(array $invalidates): void
    {
        if (\count($invalidates) > 0) {
            if ($this->cache instanceof AdapterInterface && null !== $this->context) {
                $this->cache->clearByPrefixes($invalidates);
            } elseif (null !== $this->cache) {
                $this->cache->clear();
            }

            if ($this->sim instanceof CacheSecurityIdentityManagerInterface) {
                $this->sim->invalidateCache();
            }
        }
    }
818999
public static function createFromArray(array $updates)
    {
        $update = new MapUpdate();

        foreach ($updates as $key => $val) {

            if (is_bool($val)) {
                $update->updateFlag($key, new FlagOp($val));

                continue;
            }

            if (is_string($val)) {
                $update->updateRegister($key, new RegisterOp($val));

                continue;
            }

            if (is_int($val)) {
                $update->updateCounter($key, new CounterOp($val));

                continue;
            }

            if (is_array($val) && ($val === array_values($val))) {

                $update->updateSet($key, new SetOp($val, []));

                continue;
            }

            if (is_array($val)) {

                $update->updateMap($key, self::createFromArray($val)->getOp());

                continue;
            }

            $message = 'Map element "%s" must be of the type (boolean, string, integer, or an array), "%s" given.';
            $type    = is_object($val) ? get_class($val) : gettype($val);

            throw new InvalidArgumentException(sprintf($message, $key, $type));
        }

        return $update;
    }
863376
public function setEntry(Entry $entry)
    {
        $entry->format = $this->format;
        $entry->prepare();

        $this->entries->add($entry);
    }
816990
public function upsert($rows, $updates = [])
    {
        return $this->db->upsert($this->table, $rows, $updates);
    }
713159
public function printUpdates($updates) {
    /**
     * @var string $method_name
     * @var Update $update
     */
    foreach ($updates as $method_name => $update) {
      $this->output->writeln(" - $method_name: {$update->description}");
    }
    $this->output->writeln('');
  }
307725
public function doUpdate(Updater $updater)
    {
        $config = Config::getInstance();
        $config->Plugins_Tracker = array();
        $config->forceSave();
    }
469633
private function addEntry($entry)
	{
		if($entry != null)
		{
			if($this->entries == null)
				$this->entries = array();
			$this->entries[] = $entry;
		}
	}
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;
	}
1166963
public function saveOperations(array $operations)
    {

        $this->logger->info('Save operations', array('miraklId' => null, "action" => "Operations creation"));
        $this->operationManager->saveAll($operations);
        $this->logOperationsManager->saveAll($this->operationsLogs);
        $this->saveAdjustedOperations($this->adjustedOperations);
        $this->logger->info('[OK] Operations saved', array('miraklId' => null, "action" => "Operations creation"));
    }
762144
public function trackUpdate(Update $update, $eventName = 'Message')
    {
        if (!in_array($update->getUpdateId(), $this->trackedEvents)) {
            $this->trackedEvents[] = $update->getUpdateId();

            $this->track($update->getMessage(), $eventName);

            if (count($this->trackedEvents) > self::MAX_TRACKED_EVENTS) {
                $this->trackedEvents = array_slice($this->trackedEvents, round(self::MAX_TRACKED_EVENTS / 4));
            }
        }
    }