// Update updates an existing record in the bolthold
// if the Key doesn't already exist in the store, then it fails with ErrNotFound
337872
func (s *Store) Update(key interface{}, data interface{}) error {
	return s.Bolt().Update(func(tx *bolt.Tx) error {
		return s.TxUpdate(tx, key, data)
	})
}
224833
func (s *service) Update(ctx context.Context, r *taskAPI.UpdateTaskRequest) (*ptypes.Empty, error) {
	log.G(ctx).Debugf("Update: %s", r.ID)

	return nil, errdefs.ErrNotImplemented
}
47398
func (b *DynamoDBBackend) Update(ctx context.Context, item backend.Item) (*backend.Lease, error) {
	err := b.create(ctx, item, modeUpdate)
	if trace.IsCompareFailed(err) {
		err = trace.NotFound(err.Error())
	}
	if err != nil {
		return nil, trace.Wrap(err)
	}
	return b.newLease(item), nil
}
844646
func (vt *VirtualTable) UpdateRecord(ctx sessionctx.Context, h int64, oldData, newData []types.Datum, touched []bool) error {
	return table.ErrUnsupportedOp
}
855775
func (self *Record) Update(args RecordUpdate) ([]*RecordInfo, error) {
	var res []interface{}
	updateArgs := map[string]interface{}{
		"name":  args.Name,
		"type":  args.Type,
		"value": args.Value,
		"ttl":   args.Ttl,
	}
	updateOpts := map[string]string{
		"id": args.Id,
	}

	params := []interface{}{self.Key, args.Zone, args.Version, updateOpts, updateArgs}
	if err := self.Call("domain.zone.record.update", params, &res); err != nil {
		return nil, err
	}

	records := make([]*RecordInfo, 0)
	for _, r := range res {
		record := ToRecordInfo(r.(map[string]interface{}))
		records = append(records, record)
	}
	return records, nil
}
413001
func (d *OvsdbDriver) Update(context interface{}, tableUpdates libovsdb.TableUpdates) {
	d.populateCache(tableUpdates)
	intfUpds, ok := tableUpdates.Updates["Interface"]
	if !ok {
		return
	}

	for _, intfUpd := range intfUpds.Rows {
		intf := intfUpd.New.Fields["name"]
		oldLacpStatus, ok := intfUpd.Old.Fields["lacp_current"]
		if !ok {
			return
		}
		newLacpStatus, ok := intfUpd.New.Fields["lacp_current"]
		if !ok {
			return
		}
		if oldLacpStatus == newLacpStatus || d.ovsSwitch == nil {
			return
		}

		linkUpd := ofnet.LinkUpdateInfo{
			LinkName:   intf.(string),
			LacpStatus: newLacpStatus.(bool),
		}
		log.Debugf("LACP_UPD: Interface: %+v. LACP Status - (Old: %+v, New: %+v)\n", intf, oldLacpStatus, newLacpStatus)
		d.ovsSwitch.HandleLinkUpdates(linkUpd)
	}
}
737747
func (c *FakeStorageClasses) Update(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &v1beta1.StorageClass{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.StorageClass), err
}
1313149
func (s *ObjectstoreServer) Update(
	ctx context.Context,
	req *api.SdkObjectstoreUpdateRequest,
) (*api.SdkObjectstoreUpdateResponse, error) {
	if s.cluster() == nil {
		return nil, status.Error(codes.Unavailable, "Resource has not been initialized")
	}

	err := s.cluster().ObjectStoreUpdate(req.GetObjectstoreId(), req.GetEnable())
	if err != nil {
		if err == kvdb.ErrNotFound {
			return nil, status.Errorf(
				codes.NotFound,
				"Id %s not found",
				req.GetObjectstoreId())
		}
		return nil, status.Errorf(
			codes.Internal,
			"Failed to update objectstore: %v",
			err.Error())
	}

	return &api.SdkObjectstoreUpdateResponse{}, nil
}
332391
func (s *RolesStore) Update(ctx context.Context, u *chronograf.Role) error {
	return s.UpdateF(ctx, u)
}
917027
func (c *FakeKeysets) Update(keyset *kops.Keyset) (result *kops.Keyset, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewUpdateAction(keysetsResource, c.ns, keyset), &kops.Keyset{})

	if obj == nil {
		return nil, err
	}
	return obj.(*kops.Keyset), err
}
147158
func (r *Record) Update(recordInfo Info, args ...string) (status *Status, err error) {
	switch len(args) {
	case 0:
		_, err = r.Put(r.uri("/records"), recordInfo, &status)
	case 1:
		_, err = r.Put(r.uri("/records/%s", args...), recordInfo, &status)
	case 2:
		_, err = r.Put(r.uri("/records/%s/%s", args...), recordInfo, &status)
	default:
		err = r.formatCallError("Update", args...)
	}
	return
}
1315573
func (el *EndpointsLock) Update(ler LeaderElectionRecord) error {
	if el.e == nil {
		return errors.New("endpoint not initialized, call get or create first")
	}
	recordBytes, err := json.Marshal(ler)
	if err != nil {
		return err
	}
	el.e.Annotations[LeaderElectionRecordAnnotationKey] = string(recordBytes)
	el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Update(el.e)
	return err
}
300506
func (pb *Bar) Update() {
	pb.mu.Lock()
	defer pb.mu.Unlock()

	c := atomic.LoadInt64(&pb.current)
	if pb.AlwaysUpdate || c != pb.currentValue {
		pb.write(c)
		pb.currentValue = c
	}
}
1135684
func (o *Object) Update() {
	o.mut.Lock()
	o.checked = false
	o.mut.Unlock()
}
874019
func (f *VersionFactory) Update(key string, vers *Version) {
	if vers.Scalar > f.latest[key] {
		f.latest[key] = vers.Scalar
	}
}
1330337
func (lkp *lookupInternal) Update(vcursor VCursor, oldValues []sqltypes.Value, ksid sqltypes.Value, newValues []sqltypes.Value) error {
	if err := lkp.Delete(vcursor, [][]sqltypes.Value{oldValues}, ksid); err != nil {
		return err
	}
	return lkp.Create(vcursor, [][]sqltypes.Value{newValues}, []sqltypes.Value{ksid}, false /* ignoreMode */)
}
707857
func (s *OrganizationsStore) Update(ctx context.Context, o *chronograf.Organization) error {
	org, err := s.get(ctx, o.ID)
	if err != nil {
		return err
	}
	if o.Name != org.Name && !s.nameIsUnique(ctx, o.Name) {
		return chronograf.ErrOrganizationAlreadyExists
	}
	return s.client.db.Update(func(tx *bolt.Tx) error {
		if v, err := internal.MarshalOrganization(o); err != nil {
			return err
		} else if err := tx.Bucket(OrganizationsBucket).Put([]byte(o.ID), v); err != nil {
			return err
		}
		return nil
	})
}