Creates arel update manager

 @return [Arel::UpdateManager]
555968
def arel_update
        table = self.class.arel_tables[entity.class.table_name][hydra_attribute.backend_type]
        arel  = table.from(table)
        arel.where(table[:id].eq(id)).compile_update(table[:value] => value, table[:updated_at] => Time.now)
      end
1336034
def updates
      available.select do |spec|
        if wagon = installed_spec(spec.name)
          wagon.version < spec.version
        end
      end
    end
834667
def update
      config.update(:remotes) do |rmts|
        yield(rmts || {}).tap do |new_rmts|
          raise_invalid unless validate(new_rmts)
        end
      end
    end
57221
def create_versions_hash
      hash = Hash.new { |h, k| h[k] = [] }

      versions.each do |version|
        hash[version[0]] << version
      end

      hash
    end
567689
function compileUpdate()
    {
        $updateManager = new UpdateManager;
        $updateManager->table($this->nodes->source->getLeft());

        foreach ($this->nodes->restrictions as $expr) {
            $updateManager->where($expr);
        }

        foreach ($this->nodes->orders as $order) {
            $updateManager->order($order);
        }

        empty($this->nodes->limit) ?:
            $updateManager->take($this->nodes->limit->getExpression());

        empty($this->nodes->offset) ?:
            $updateManager->skip($this->nodes->offset->getExpression());

        return $updateManager;
    }
1284274
def create_or_update(sender, **kwargs):
    
    now = datetime.datetime.now()

    # I can't explain why this import fails unless it's here.
    from activity_monitor.models import Activity
    instance = kwargs['instance']

    # Find this object's content type and model class.
    instance_content_type = ContentType.objects.get_for_model(sender)
    instance_model        = sender
    content_object        = instance_model.objects.get(id=instance.id)

    # check to see if the activity already exists. Will need later.
    try:
        activity = Activity.objects.get(content_type=instance_content_type, object_id=content_object.id)
    except:
        activity = None

    # We now know the content type, the model (sender), content type and content object.
    # We need to loop through ACTIVITY_MONITOR_MODELS in settings for other fields
    for activity_setting in settings.ACTIVITY_MONITOR_MODELS:
        this_app_label    = activity_setting['model'].split('.')[0]
        this_model_label  = activity_setting['model'].split('.')[1]
        this_content_type = ContentType.objects.get(app_label=this_app_label, model=this_model_label)

        if this_content_type == instance_content_type:
            # first, check to see if we even WANT to register this activity.
            # use the boolean 'check' field. Also, delete if needed.
            if 'check' in activity_setting:
                if getattr(instance, activity_setting['check']) is False:
                    if activity:
                        activity.delete()
                    return

            # does it use the default manager (objects) or a custom manager?
            try:
                manager = activity_setting['manager']
            except:
                manager  = 'objects'

            # what field denotes the activity time? created is default
            try:
                timestamp = getattr(instance, activity_setting['date_field'])
            except:
                timestamp = getattr(instance, 'created')

            # if the given time stamp is a daterather than datetime type,
            # normalize it out to a datetime
            if type(timestamp) == type(now):
                clean_timestamp = timestamp
            else:
                clean_timestamp = datetime.datetime.combine(timestamp, datetime.time())

           # Find a valid user object
            if 'user_field' in activity_setting:  # pull the user object from instance using user_field
                user = getattr(instance, activity_setting['user_field'])
            elif this_model_label == 'user' or this_model_label == 'profile':  # this IS auth.user or a Django 1.5 custom user
                user = instance
            else:  # we didn't specify a user, so it must be instance.user
                user = instance.user

            # BAIL-OUT CHECKS
            # Determine all the reasons we would want to bail out.
            # Make sure it's not a future item, like a future-published blog entry.
            if clean_timestamp > now:
                return
            # or some really old content that was just re-saved for some reason
            if clean_timestamp < (now - datetime.timedelta(days=3)):
                return
            # or there's not a user object
            if not user:
                return
            # or the user is god or staff, and we're filtering out, don't add to monitor
            if user.is_superuser and 'filter_superuser' in activity_setting:
                return
            if user.is_staff and 'filter_staff' in activity_setting:
                return

            # build a default string representation
            # note that each activity can get back to the object via get_absolute_url()
            verb = activity_setting.get('verb', None)
            override_string = activity_setting.get('override_string', None)


    # MANAGER CHECK
    # Make sure the item "should" be registered, based on the manager argument.
    # If InstanceModel.manager.all() includes this item, then register. Otherwise, return.
    # Also, check to see if it should be deleted.
    try:
        getattr(instance_model, manager).get(pk=instance.pk)
    except instance_model.DoesNotExist:
        try:
            activity.delete()
            return
        except Activity.DoesNotExist:
            return

    if user and clean_timestamp and instance:
        if not activity:  # If the activity didn't already exist, create it.
            activity = Activity(
                actor          = user,
                content_type   = instance_content_type,
                object_id      = content_object.id,
                content_object = content_object,
                timestamp      = clean_timestamp,
                verb = verb,
                override_string = override_string,
            )
            activity.save()
        return activity
579370
def update
      upsert do
        # NOTE:
        # 1. update ++then++ valid to set new values in @record to draw form.
        # 1. user_scoped may have joins so that record could be
        #    ActiveRecord::ReadOnlyRecord so that's why access again from
        #    model.
        @record  = model.find(user_scoped.find(params[:id]).id)
       #upsert_files
        if !@record.update_attributes(permitted_params(:update))
          raise ActiveRecord::RecordInvalid.new(@record)
        end
      end
    end
214488
def changes
      changes = {'new' => {}, 'obsolete' => {}, 'updated' => {}}

      if @environment.nil?
        new_environments.each do |env|
          changes['new'][env] = {}
        end

        old_environments.each do |env|
          changes['obsolete'][env] = {}
        end
      else
        env = @environment
        changes['new'][env] = {} if new_environments.include?(@environment)
        changes['obsolete'][env] = {} if old_environments.include?(@environment)
      end
      changes
    end
922054
def update
      respond_to do |wants|
        result = resource_get.update_attributes(resource_params)
        call_hook :after_update_attributes, result
        if result
          flash[:notice] = t 'messages.record_updated', model: t("models.#{resource_name}")
          wants.html { redirect_to(resource_get) }
          wants.json  { head :ok }
        else
          wants.html { render :action => "edit" }
          wants.json  { render :json => resource_get.errors, :status => :unprocessable_entity }
        end
      end
    end
1269484
def update_or_create(self, attributes, values=None, joining=None, touch=True):
        
        if values is None:
            values = {}

        instance = self._query.where(attributes).first()

        if instance is None:
            return self.create(values, joining, touch)

        instance.fill(**values)

        instance.save({"touch": False})

        return instance
1006093
def update():
    # type: () -> None
    
    branch = git.current_branch(refresh=True)
    develop = conf.get('git.devel_branch', 'develop')

    common.assert_branch_type('feature')
    common.git_checkout(develop)
    common.git_pull(develop)
    common.git_checkout(branch.name)
    common.git_merge(branch.name, develop)
1201248
def update_stack_list!
      if updater.nil? || !updater.alive?
        self.updater = Thread.new {
          loop do
            begin
              fetch_stacks
              sleep(stack_list_interval)
            rescue => e
              logger.error "Failure encountered on stack fetch: #{e.class} - #{e}"
            end
          end
        }
        true
      else
        false
      end
    end
472299
def createManager(self, services, yadis_url=None):
        
        key = self.getSessionKey()
        if self.getManager():
            raise KeyError('There is already a %r manager for %r' %
                           (key, self.url))

        if not services:
            return None

        manager = YadisServiceManager(self.url, yadis_url, services, key)
        manager.store(self.session)
        return manager
645059
function createScheduleStatusUpdate() {
  var isChanging = false;
  var shouldUpdate = false;

  function update(self, fn) {
    raf(function() {
      if (self.isMounted()) fn();
      isChanging = false;
      if (shouldUpdate) update(self, fn);
      shouldUpdate = false;
    });
  }

  return function _scheduleStatusUpdate(fn) {
    if (isChanging) return shouldUpdate = true;
    var self = this;
    isChanging = true;
    update(self, fn || self._updateChildrenLoadingStatus);
  };
}
1245234
def update(self, loadbalancer, name=None, algorithm=None, protocol=None,
            halfClosed=None, port=None, timeout=None, httpsRedirect=None):
        
        return self._manager.update(loadbalancer, name=name,
                algorithm=algorithm, protocol=protocol, halfClosed=halfClosed,
                port=port, timeout=timeout, httpsRedirect=httpsRedirect)
253320
def update(self, name=None, password=None, host=None):
        
        return self.manager.update(self, name=name, password=password,
                host=host)
498468
def synchronize updater
      raise 'Invalid synchronization' unless updater.filename == filename
      real_code = updater.write(@code)
      if real_code == @code
        @version = updater.version
        return self
      end
      synced = Source.new(real_code, filename)
      if synced.parsed?
        synced.version = updater.version
        return synced
      end
      incr_code = updater.repair(@repaired)
      synced = Source.new(incr_code, filename)
      synced.error_ranges.concat (error_ranges + updater.changes.map(&:range))
      synced.code = real_code
      synced.version = updater.version
      synced
    end