// Updates update attributes with callbacks, refer: https://jinzhu.github.io/gorm/crud.html#update
326525
func (s *DB) Updates(values interface{}, ignoreProtectedAttrs ...bool) *DB {
	return s.NewScope(s.Value).
		Set("gorm:ignore_protected_attrs", len(ignoreProtectedAttrs) > 0).
		InstanceSet("gorm:update_interface", values).
		callCallbacks(s.parent.callbacks.updates).db
}
201470
func (r *ReleasesService) Update(params interface{}) (release *Release, result *Result) {
	result = r.client.patch(r.URL, params, &release)
	return
}
219140
func (s *UserStorage) Update(c model.User) error {
	_, exists := s.users[c.ID]
	if !exists {
		return fmt.Errorf("User with id %s does not exist", c.ID)
	}
	s.users[c.ID] = &c

	return nil
}
198606
func (s *SessionStatsCollector) Update(id int64, delta int64, count int64, colSize *map[int64]int64) {
	s.Lock()
	defer s.Unlock()
	s.mapper.update(id, delta, count, colSize)
}
109568
func (crs *ConfigRepoService) Update(ctx context.Context, id string, cr *ConfigRepo) (out *ConfigRepo, resp *APIResponse, err error) {
	out = &ConfigRepo{}
	_, resp, err = crs.client.putAction(ctx, &APIClientRequest{
		Path:         fmt.Sprintf("admin/config_repos/%s", id),
		RequestBody:  cr,
		ResponseBody: out,
		APIVersion:   apiV1,
	})

	out.client = crs.client
	return
}
847847
func (a *accounter) Update() {
	c := atomic.LoadInt64(&a.current)
	if c != a.currentValue {
		a.write(c)
		a.currentValue = c
	}
}
264467
func (u *updater) Update(status error) {
	u.mu.Lock()
	defer u.mu.Unlock()

	u.status = status
}
691516
func (self *CustomerClient) Update(id string, c *CustomerParams) (*Customer, error) {
	customer := Customer{}
	values := url.Values{}
	appendCustomerParamsToValues(c, &values)

	err := query("POST", "/v1/customers/"+url.QueryEscape(id), values, &customer)
	return &customer, err
}
874982
func (s *SourcesStore) Update(ctx context.Context, src chronograf.Source) error {
	return s.UpdateF(ctx, src)
}
977687
func (t *LinodeService) Update(linodeId int, args map[string]interface{}) (*LinodeResponse, error) {
	u := &url.Values{}

	u.Add("LinodeID", strconv.Itoa(linodeId))
	// add optional parameters
	for k, v := range args {
		u.Add(k, fmt.Sprintf("%v", v))
	}

	v := LinodeResponse{}
	if err := t.client.do("linode.update", u, &v.Response); err != nil {
		return nil, err
	}

	if err := json.Unmarshal(v.RawData, &v.LinodeId); err != nil {
		return nil, err
	}
	return &v, nil
}
1135684
func (o *Object) Update() {
	o.mut.Lock()
	o.checked = false
	o.mut.Unlock()
}
386111
func (s *UpdateFacetInput) SetAttributeUpdates(v []*FacetAttributeUpdate) *UpdateFacetInput {
	s.AttributeUpdates = v
	return s
}
498370
func (c *CommitCommentsService) Update(uri *Hyperlink, uriParams M, requestParams interface{}) (comment *CommitComment, result *Result) {
	url, err := ExpandWithDefault(uri, &RepoCommentsURL, uriParams)
	if err != nil {
		return nil, &Result{Err: err}
	}

	result = c.client.patch(url, requestParams, &comment)
	return
}
457979
func Update(table string) *UpdateStmt {
	return &UpdateStmt{
		Table:      table,
		Value:      make(map[string]interface{}),
		LimitCount: -1,
	}
}
1236040
func (t *Table) Update(columns ...string) (stmt string, names []string) {
	return qb.Update(t.metadata.Name).Set(columns...).Where(t.primaryKeyCmp...).ToCql()
}
325654
func (s *BatchUpdateLinkAttributes) SetAttributeUpdates(v []*LinkAttributeUpdate) *BatchUpdateLinkAttributes {
	s.AttributeUpdates = v
	return s
}
983932
func (s *session) Update(table Table, fields ...string) error {
	action, err := s.update(table, false, fields...)
	if err != nil {
		return s.catch("Update: "+action, err)
	}
	return nil
}