Update syncdata

@param Registry &$syncdata the actual syncdata
433538
public static function updateData(Registry $syncdata)
	{
		//find out if the syncid already exists
		$db = Factory::getDBO();

		$query = $db->getQuery(true)
			->update('#__jfusion_sync')
			->set('syncdata = ' . $db->quote($syncdata->toString()))
			->where('syncid = ' . $db->quote($syncdata->get('syncid')));

		$db->setQuery($query);
		$db->execute();
	}
769238
private function syncUpdated(array $updated)
    {
        foreach ($updated as $key => $value) {
            $this->newQuery()
                 ->where($this->keyColumn, '=', $key)
                 ->update([$this->valueColumn => $value]);
        }
    }
799678
function synchronizeEntry(id) {
        var entry = extensions[id];

        // Do nothing if we only have one set of data
        if (!entry || !entry.installInfo || !entry.registryInfo) {
            return;
        }

        entry.installInfo.owner = entry.registryInfo.owner;

        // Assume false
        entry.installInfo.updateAvailable   = false;
        entry.registryInfo.updateAvailable  = false;
        entry.installInfo.updateCompatible  = false;
        entry.registryInfo.updateCompatible = false;

        var currentVersion = entry.installInfo.metadata ? entry.installInfo.metadata.version : null;
        if (currentVersion && semver.lt(currentVersion, entry.registryInfo.metadata.version)) {
            // Note: available update may still be incompatible; we check for this when rendering the Update button in ExtensionManagerView._renderItem()
            entry.registryInfo.updateAvailable  = true;
            entry.installInfo.updateAvailable   = true;
            // Calculate updateCompatible to check if there's an update for current version of Brackets
            var lastCompatibleVersionInfo = _.findLast(entry.registryInfo.versions, function (versionInfo) {
                return !versionInfo.brackets || semver.satisfies(brackets.metadata.apiVersion, versionInfo.brackets);
            });
            if (lastCompatibleVersionInfo && lastCompatibleVersionInfo.version && semver.lt(currentVersion, lastCompatibleVersionInfo.version)) {
                entry.installInfo.updateCompatible        = true;
                entry.registryInfo.updateCompatible       = true;
                entry.installInfo.lastCompatibleVersion   = lastCompatibleVersionInfo.version;
                entry.registryInfo.lastCompatibleVersion  = lastCompatibleVersionInfo.version;
            }
        }

        exports.trigger("registryUpdate", id);
    }
1212331
public function run(&$actionData)
    {
        foreach ($actionData->entities as $className => $ids) {
            if (class_exists($className)) {
                $ids = (array) $ids;
                $models = [];
                $mapping = ArrayHelper::getValue($this->entitiesMapping, $className, $className);

                $modelLoadSettings = ArrayHelper::merge(
                    [
                        'useCache' => true,
                        'cacheLifetime' => 86400,
                        'throwException' => false,
                        'useIdentityMap' => true,
                    ],
                    ArrayHelper::getValue($this->entitiesLoadSettings, $className, [])
                );

                foreach ($ids as $id) {
                    /** @var TagDependencyTrait $className */
                    $models[$id] = $className::loadModel(
                        $id,
                        false,
                        $modelLoadSettings['useCache'],
                        $modelLoadSettings['cacheLifetime'],
                        $modelLoadSettings['throwException'],
                        $modelLoadSettings['useIdentityMap']
                    );
                }
                if ($this->convertOneModelToArray === false && count($models) === 1) {
                    $models = reset($models);
                }
                if ($this->nullOnEmptyArray === true && count($models) === 0) {
                    $models = null;
                }
                /** @var string $className */
                // replace with models
                switch ($this->fill) {
                    case static::FILL_ENTITIES_ADD:
                        $actionData->entities[$mapping] = $models;
                        break;
                    case static::FILL_ENTITIES_REPLACE:
                        unset($actionData->entities[$className]);
                        $actionData->entities[$mapping] = $models;
                        break;
                    case static::FILL_RESULT:
                    default:
                        $actionData->result[$mapping] = $models;
                        break;
                }
            }
        }
    }
268331
private function commitMsgProcess(Config $configData)
    {
        /** @var CommitMsg $commitMsgData */
        $commitMsgData = $configData->getCommitMsg();

        return $this->commitMsgProcessor->process($commitMsgData, $this->io);
    }
870359
public function syncData()
    {
        if (Yii::$app->controller->interactive && $this->getRows() > self::LARGE_TABLE_PROMPT) {
            if (Console::confirm("{$this->getName()} has {$this->getRows()} entries. Do you want continue table sync?", true) === false) {
                return;
            }
        }

        $sqlMode = $this->prepare();

        try {
            Yii::$app->db->createCommand()->truncateTable($this->getName())->execute();

            $this->syncDataInternal();
        } finally {
            $this->cleanup($sqlMode);
        }
    }
781756
protected function addToRegistry($data, string $key = null)
    {
        is_null($key) and $key = get_class($data);
        $this->registry[$key] = $data;
    }
725238
protected function validate(array $data = null)
    {
        if ($this->client->getIndex() == null) {
            throw new SyncMySqlExceptions("Index cannot be null");
        }
        if ($this->client->getType() == null) {
            throw new SyncMySqlExceptions("Type cannot be null");
        }
        if ($data != null) {
            if ($data['con'] == null) {
                throw new SyncMySqlExceptions("Please provide a valid database connection string");
            }
            if ($this->queryChanged == false) {
                if (empty($data['tableName'])) {
                    throw new SyncMySqlExceptions("Please provide a tablename for SELECT query");
                }
            }
            if (isset($data['insertId'])) {
                if (empty($data['insertId'])) {
                    throw new SyncMySqlExceptions("Please provide the last inserted Id");
                }
            }
        }
    }
1049351
public function syncNodeData($node_name, $datas, $type)
    {
        $datas = array_values($datas);
        ProcessManager::getInstance()->getRpcCall(ClusterProcess::class, true)->th_syncData($node_name, $datas, $type);
    }
258561
private void evaluateSync(String data){
        if (!m_sync && data!=null && data.contains(org.opencms.gwt.client.rpc.CmsRpcAction.SYNC_TOKEN)){
            m_sync=true;
        }
    }
1059422
public function setData($modelData)
    {
        if ($this->config->getInheritData()) {
            throw new RuntimeException('You cannot change the data of a block inheriting its parent data.');
        }

        if ($this->lockSetData) {
            throw new RuntimeException('A cycle was detected. Listeners to the PRE_SET_DATA event must not call setData(). You should call setData() on the BlockEvent object instead.');
        }

        if (null !== $this->getForm() && null === $this->getForm()->getData()) {
            $this->getForm()->setData($modelData);
        }

        $this->lockSetData = true;
        $dispatcher = $this->config->getEventDispatcher();

        // Hook to change content of the data
        if ($dispatcher->hasListeners(BlockEvents::PRE_SET_DATA)) {
            $event = new BlockEvent($this, $modelData);
            $dispatcher->dispatch(BlockEvents::PRE_SET_DATA, $event);
            $modelData = $event->getData();
        }

        if (BlockUtil::isEmpty($modelData)) {
            $emptyData = $this->config->getEmptyData();

            if ($emptyData instanceof \Closure) {
                /* @var \Closure $emptyData */
                $emptyData = $emptyData($this, $modelData, $this->getOptions());
            }

            $modelData = $emptyData;
        }

        // Treat data as strings unless a value transformer exists
        if (!$this->config->getViewTransformers() && !$this->config->getModelTransformers() && is_scalar($modelData) && !\is_bool($modelData)) {
            $modelData = (string) $modelData;
        }

        // Synchronize representations - must not change the content!
        $normData = $this->modelToNorm($modelData);
        $viewData = $this->normToView($normData);

        // Validate if view data matches data class (unless empty)
        if (!BlockUtil::isEmpty($viewData)) {
            $dataClass = $this->getDataClass();

            $actualType = \is_object($viewData) ? 'an instance of class '.\get_class($viewData) : ' a(n) '.\gettype($viewData);

            if (null === $dataClass && \is_object($viewData) && !$viewData instanceof \ArrayAccess) {
                $expectedType = 'scalar, array or an instance of \ArrayAccess';

                throw new LogicException(
                        'The block\'s view data is expected to be of type '.$expectedType.', '.
                        'but is '.$actualType.'. You '.
                        'can avoid this error by setting the "data_class" option to '.
                        '"'.\get_class($viewData).'" or by adding a view transformer '.
                        'that transforms '.$actualType.' to '.$expectedType.'.'
                );
            }

            if (null !== $dataClass && !$viewData instanceof $dataClass) {
                throw new LogicException(
                        'The block\'s view data is expected to be an instance of class '.
                        $dataClass.', but is '.$actualType.'. You can avoid this error '.
                        'by setting the "data_class" option to null or by adding a view '.
                        'transformer that transforms '.$actualType.' to an instance of '.
                        $dataClass.'.'
                );
            }
        } else {
            $viewData = (string) $this->config->getEmptyMessage();
        }

        $this->modelData = $modelData;
        $this->normData = $normData;
        $this->viewData = $viewData;
        $this->defaultDataSet = true;
        $this->lockSetData = false;

        if (\count($this->children) > 0) {
            $childrenIterator = new InheritDataAwareIterator($this->children);
            $childrenIterator = new \RecursiveIteratorIterator($childrenIterator);
            $this->config->getDataMapper()->mapDataToViews($viewData, $childrenIterator);
        }

        if ($dispatcher->hasListeners(BlockEvents::POST_SET_DATA)) {
            $event = new BlockEvent($this, $modelData);
            $dispatcher->dispatch(BlockEvents::POST_SET_DATA, $event);
        }

        return $this;
    }
83246
public function applyData ( $data = NULL ) {
        parent::applyData( $data );
        if ($data != null) {
            self::$propData[$this->getKey()] = $this;
            self::$keyCache[$this->getClassKey()] = $this->__keyName;
            $key = $this->__keyName;
            self::$__ids[$this->getClassKey()][$this->$key] = true;
        }
    }
951887
public function registerTemplateType(array $templateTypeData)
    {
        $templateType = $this->normalizer->denormalize(
            array('id' => $templateTypeData['id'], 'name' => $templateTypeData['name']),
            $this->entityCollection->getEntityClass()
        );
        foreach ($templateTypeData['zones'] as $zoneTypeId) {
            $templateType->getZoneTypes()->set(
                $zoneTypeId,
                $this->zoneTypeLoader->retrieve($zoneTypeId)
            );
        }

        $this->entityCollection->set($templateType->getId(), $templateType);
    }
363564
private function applyCachedData($data)
    {
        foreach ($data as $key => $value) {
            $this->$key = $value;
        }

        $this->cached = true;
    }
40160
private function syncItemSubscriberUpdateMode($importData, $websiteId)
    {
        $email = $importData['email'];
        $id = $importData['id'];
        $result = $this->client->postContacts($email);
        if (isset($result->id)) {
            $contactId = $result->id;
            $this->client->deleteAddressBookContact(
                $this->helper->getSubscriberAddressBook($websiteId),
                $contactId
            );
        } else {
            //suppress contacts
            $this->suppressedContactIds[] = $id;
        }
        return $result;
    }
396024
function() {
    var self = this
    self._shouldSyncFromOpts = true
    self.on('update', function() {
      if (self._shouldSyncFromOpts) self.trigger('sync')
      self._shouldSyncFromOpts = true
    })
  }
284696
public function setTemplateData(array $templateData)
    {
        if (!isset($this->templateData)) {
            $this->templateData = [];
        }

        $this->templateData = array_merge($this->templateData, $templateData);

        return $this;
    }