Update the value of the field from the repository
337137
def get_field(self, field):
        
        # Load fields JSON, locking to prevent read/write conflicts
        # Would be better if only checked if locked to allow
        # concurrent reads but not possible with multi-process
        # locks (in my understanding at least).
        fpath = self.fields_json_path(field)
        try:
            with InterProcessLock(fpath + self.LOCK_SUFFIX,
                                  logger=logger), open(fpath, 'r') as f:
                dct = json.load(f)
            val = dct[field.name]
            if field.array:
                val = [field.dtype(v) for v in val]
            else:
                val = field.dtype(val)
        except (KeyError, IOError) as e:
            try:
                # Check to see if the IOError wasn't just because of a
                # missing file
                if e.errno != errno.ENOENT:
                    raise
            except AttributeError:
                pass
            raise ArcanaMissingDataException(
                "{} does not exist in the local repository {}"
                .format(field.name, self))
        return val
1289709
def update(self, request, id):
        """"""
        try:
            object = self.model.objects.get(id=id)
        except self.model.DoesNotExist:
            return self._render(
                request = request,
                template = '404',
                context = {
                    'error': 'The %s could not be found.' % self.model.__name__.lower()
                },
                status = 404,
                prefix_template_path = False
            )

        fields = []
        for field in request.PATCH:

            try:
                self.model._meta.get_field_by_name(field)
            except FieldDoesNotExist:
                continue
            else:
                fields.append(field)

        Form = generate_form(
            model = self.model,
            form = self.form,
            fields = fields
        )

        form = Form(request.PATCH, instance=object)
        if form.is_valid():
            object = form.save()

            return self.show(request, id)
        else:
            return self._render(
                request = request,
                template = 'edit',
                context = {
                    'form': form
                },
                status = 400
            )
726416
protected function submitAddFieldValue()
    {
        $this->setSubmitted(null, $this->getParam());
        $this->validateComponent('field_value');
        $this->addFieldValue();
    }
26603
def update(collection_name, upsert, multi,
           spec, doc, safe, last_error_args, check_keys, opts):
    
    options = 0
    if upsert:
        options += 1
    if multi:
        options += 2

    data = _ZERO_32
    data += bson._make_c_string(collection_name)
    data += struct.pack("<i", options)
    data += bson.BSON.encode(spec, False, opts)
    encoded = bson.BSON.encode(doc, check_keys, opts)
    data += encoded
    if safe:
        (_, update_message) = __pack_message(2001, data)
        (request_id, error_message, _) = __last_error(collection_name,
                                                      last_error_args)
        return (request_id, update_message + error_message, len(encoded))
    else:
        (request_id, update_message) = __pack_message(2001, data)
        return (request_id, update_message, len(encoded))
1319729
def _update_field(self, uri, field):
		'''
		'''
		#req sanity check
		payload = None
		if  type(field) is not StreakField:
			return requests.codes.bad_request, None

		payload = field.to_dict(rw = True)
	
		#print(new_pl.attributes)
		#print(new_pl.to_dict())
		#raw_input()
		try:
			uri = '/'.join([
							uri, 
							field.attributes['key']
							])
		except KeyError:
			return requests.codes.bad_request, None
	
		code, data = self._req('post', uri , json.dumps(payload))
		
		return code, data
1143402
function Update(subject, source) {
    if (!(this instanceof Update)) {
        return new Update(subject, source);
    }
    this.id = uuid.v4();
    this.timestamp = Date.now();

    // Populate subject
    subject = subject || {};
    this.address = subject.address;
    this.incarnationNumber = subject.incarnationNumber;
    this.status = subject.status;

    // Populate source
    source = source || {};
    this.source = source.address;
    this.sourceIncarnationNumber = source.incarnationNumber;
}
1172652
async def update(self, obj, only=None):
        
        field_dict = dict(obj.__data__)
        pk_field = obj._meta.primary_key

        if only:
            self._prune_fields(field_dict, only)

        if obj._meta.only_save_dirty:
            self._prune_fields(field_dict, obj.dirty_fields)

        if obj._meta.composite_key:
            for pk_part_name in pk_field.field_names:
                field_dict.pop(pk_part_name, None)
        else:
            field_dict.pop(pk_field.name, None)

        query = obj.update(**field_dict).where(obj._pk_expr())
        result = await self.execute(query)
        obj._dirty.clear()
        return result
81092
def setFieldValue( fieldName, fieldValue, dbid = nil, rid = nil, key =nil )
      @dbid ||= dbid
      @rid ||= rid
      @key ||= key
      if @dbid and (@rid or @key)
         clearFieldValuePairList
         addFieldValuePair( fieldName, nil, nil, fieldValue )
         editRecord( @dbid, @rid, @fvlist, nil, nil, nil, nil, nil, @key )
      end
   end
235230
def update_field(self, f, obj):
        
        n = self.get_private_name(f)
        if not hasattr(self, n):
            raise AttributeError('{0} is not in {1}'.format(n, self.__class__.__name__))

        setattr(self, n, obj)
        self.__origin_keys.add(f)
812228
def update(self, key=values.unset, value=values.unset):
        
        data = values.of({'Key': key, 'Value': value, })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return VariableInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            environment_sid=self._solution['environment_sid'],
            sid=self._solution['sid'],
        )
985358
def update_custom_field(self, custom_field_key, field_name,
                            visible_in_preference_center):
        """"""
        custom_field_key = quote(custom_field_key, '')
        body = {
            "FieldName": field_name,
            "VisibleInPreferenceCenter": visible_in_preference_center}
        response = self._put(self.uri_for("customfields/%s" %
                                          custom_field_key), json.dumps(body))
        return json_to_py(response)
570958
def update_data(self, index, data):
        

        datapack = self.built_embed.to_dict()["fields"][index]
        self.built_embed.set_field_at(index, name=datapack["name"], value=data, inline=datapack["inline"])
658585
protected function updateOrderFieldOnDelete()
    {
        static::orderModel()
            ->where($this->getOrderField(), '>', $this->getOrderValue())
            ->decrement($this->getOrderField());
    }
1061802
def update_from_field(field_name)
      if fields[field_name].localized?
        read_attribute(field_name).to_a.map { |lang, value| cast_value(value, language: lang) }.flatten
      else
        cast_value send(field_name)
      end
    end
1040295
def update(self, commit=True, **kwargs):
        

        for (attr, value) in kwargs.iteritems():
            setattr(self, attr, value)
        return commit and self.save() or self
1226723
public function updateValue()
    {
        $name = $this->getName();
        foreach ($this->getDataSources() as $ds) {
            if (null !== ($value = $ds->getValue($name))) {
                $this->setValue($value);
                return;
            }
        }
        parent::updateValue();
    }
738948
private void parseFieldUpdate(String fieldName, UNode valueNode) {
        if (valueNode.isValue()) {
            addFieldValue(fieldName, valueNode.getValue());
        } else if (valueNode.childrenAreValues()) {
            parseFieldAdd(fieldName, valueNode);
        } else {
            for (UNode childNode : valueNode.getMemberList()) {
                if (childNode.isCollection() && childNode.getName().equals("add") && childNode.childrenAreValues()) {
                    // "add" for an MV field
                    parseFieldAdd(fieldName, childNode);
                } else if (childNode.isCollection() && childNode.getName().equals("remove") && childNode.childrenAreValues()) {
                    // "remove" for an MV field
                    parseFieldRemove(fieldName, childNode);
                } else {
                    parseFieldUpdate(childNode.getName(), childNode);
                }
            }
        }
    }