// Add increases the value of a specific key and returns the updated value.
978082
func (bs *ByString) Add(key string, inc int) int {
	if *bs == nil {
		*bs = make(map[string]int)
	}
	v := (*bs)[key] + inc
	(*bs)[key] = v
	return v
}
495110
func (b *FooJSONBuilder) Add(info *FooPropertyInfo) *FooJSONBuilder {
	b._properties[info.fieldName] = info
	return b
}
991463
func (f *Flash) Add(key string, value interface{}) {
	if !f.changed {
		f.changed = true
	}
	if f.v == nil {
		f.v = make(data)
	}
	f.v[key] = append(f.v[key], value)
}
519647
func (r *ring) add(key []byte, entry *entry) {
	r.getPartition(key).add(key, entry)
	atomic.AddInt64(&r.keysHint, 1)
}
214782
func (s *MappingsStore) Add(ctx context.Context, o *chronograf.Mapping) (*chronograf.Mapping, error) {
	err := s.client.db.Update(func(tx *bolt.Tx) error {
		b := tx.Bucket(MappingsBucket)
		seq, err := b.NextSequence()
		if err != nil {
			return err
		}
		o.ID = fmt.Sprintf("%d", seq)

		v, err := internal.MarshalMapping(o)
		if err != nil {
			return err
		}

		return b.Put([]byte(o.ID), v)
	})

	if err != nil {
		return nil, err
	}

	return o, nil
}
167457
func (pb *ProgressBar) Add(add int) int {
	return int(pb.Add64(int64(add)))
}
221782
func (s *SourcesStore) Add(ctx context.Context, src chronograf.Source) (chronograf.Source, error) {
	return s.AddF(ctx, src)
}
376677
func (m *Map) Add(keys ...string) {
	for _, key := range keys {
		for i := 0; i < m.replicas; i++ {
			hash := int(m.hash([]byte(strconv.Itoa(i) + key)))
			m.keys = append(m.keys, hash)
			m.hashMap[hash] = key
		}
	}
	sort.Ints(m.keys)
}
172620
func (c *Client) Add(data interface{}) error {
	c.ensureTransmission()
	c.ensureBuilder()
	return c.builder.Add(data)
}
760042
func (b *UpdateBuilder) Add(column string) *UpdateBuilder {
	return b.addValue(column, param(column))
}
451659
func (b *Base) Add(key string, value interface{}) Serializer {
	return b.AddIf(alwaysTrue, key, value)
}
1268976
func (b *BarJSONBuilder) Add(info *BarPropertyInfo) *BarJSONBuilder {
	b._properties[info.fieldName] = info
	return b
}
991994
func (w *SSTFileWriter) Add(key, value []byte) error {
	cKey := byteToChar(key)
	cValue := byteToChar(value)
	var cErr *C.char
	C.rocksdb_sstfilewriter_add(w.c, cKey, C.size_t(len(key)), cValue, C.size_t(len(value)), &cErr)
	if cErr != nil {
		defer C.free(unsafe.Pointer(cErr))
		return errors.New(C.GoString(cErr))
	}
	return nil
}
702431
func (h *HLL) Add(value string) {
	hash := h.Hasher(value)
	h.AddHash(hash)
}
419653
func (h *HelperMap) Add(key string, helper interface{}) error {
	h.moot.Lock()
	defer h.moot.Unlock()
	if h.helpers == nil {
		h.helpers = map[string]interface{}{}
	}
	err := h.validateHelper(key, helper)
	if err != nil {
		return errors.WithStack(err)
	}
	h.helpers[key] = helper
	return nil
}
1277780
func (g *Mutable) Add(v, w int) {
	g.AddCost(v, w, 0)
}
211243
func (v *OrderedValues) Add(key, val []byte) {
	for i, j := range *v {
		if len(j) > 0 && bytes.Equal(j[0], key) {
			if len(val) > 0 {
				(*v)[i] = append((*v)[i], val)
			}
			return
		}
	}
	if len(val) == 0 {
		*v = append(*v, [][]byte{key})
	} else {
		*v = append(*v, [][]byte{key, val})
	}
}