// HSet sets the field with value of key.
321303
func (db *DB) HSet(key []byte, field []byte, value []byte) (int64, error) {
	if err := checkHashKFSize(key, field); err != nil {
		return 0, err
	} else if err := checkValueSize(value); err != nil {
		return 0, err
	}

	t := db.hashBatch
	t.Lock()
	defer t.Unlock()

	n, err := db.hSetItem(key, field, value)
	if err != nil {
		return 0, err
	}

	err = t.Commit()
	return n, err
}
619944
func (c *contextValues) Set(key string, value interface{}) {
	if *c == nil {
		*c = make(map[string]interface{})
	}
	(*c)[key] = value
}
131238
func (m *MultiMap) KeySet() []interface{} {
	keys := make([]interface{}, len(m.m))
	count := 0
	for key := range m.m {
		keys[count] = key
		count++
	}
	return keys
}
1048844
func (db *DB) MSet(args ...KVPair) error {
	if len(args) == 0 {
		return nil
	}

	t := db.kvBatch

	var err error
	var key []byte
	var value []byte

	t.Lock()
	defer t.Unlock()

	for i := 0; i < len(args); i++ {
		if err := checkKeySize(args[i].Key); err != nil {
			return err
		} else if err := checkValueSize(args[i].Value); err != nil {
			return err
		}

		key = db.encodeKVKey(args[i].Key)

		value = args[i].Value

		t.Put(key, value)

	}

	err = t.Commit()
	return err
}
768265
func (h *hcode) set(code uint16, length uint16) {
	h.len = length
	h.code = code
}
715511
func (c *asyncClient) Hset(arg0 string, arg1 string, arg2 []byte) (stat FutureBool, err Error) {
	arg0bytes := []byte(arg0)
	arg1bytes := []byte(arg1)
	arg2bytes := arg2

	resp, err := c.conn.QueueRequest(&HSET, [][]byte{arg0bytes, arg1bytes, arg2bytes})
	if err == nil {
		stat = resp.future.(FutureBool)
	}

	return
}
784897
func (self *tree) Set(key string, value interface{}) Map {
	hash := hashKey(key)
	return setLowLevel(self, hash, hash, key, value)
}
1251302
func (d *Data) Set(key string, value string) {
	d.Values.Set(key, value)
}
516320
func (h Hash) Set(key string, value interface{}) Hash {
	h[key] = Value(valueToBytes(value))
	return h
}
1256132
func (s *Session) Set(key string, value interface{}) {
	if s.data == nil {
		s.data = make(Data)
	}
	s.changed = true
	s.data[key] = value
}
830503
func (db *RedisDB) setSet(k string, set setKey) {
	db.keys[k] = "set"
	db.setKeys[k] = set
	db.keyVersion[k]++
}
247790
func (fi *FastIntegerHashMap) Set(key, value uint64) {
	if float64(fi.count+1)/float64(len(fi.packets)) > ratio {
		fi.rebuild()
	}

	fi.packets.set(&packet{key: key, value: value})
	fi.count++
}
848408
func (r *Redis) Set(key string, value interface{}) error {
	return r.Client.Set(key, convertToBytes(value), 0).Err()
}
1361540
func (c *JSONConfigContainer) Set(key, val string) error {
	c.Lock()
	defer c.Unlock()
	c.data[key] = val
	return nil
}
1250826
func (c *APIContext) Set(key string, value interface{}) {
	if c.keys == nil {
		c.keys = make(map[string]interface{})
	}
	c.keys[key] = value
}
890276
func (c HTTPHeadersCarrier) Set(key, val string) {
	h := http.Header(c)
	h.Set(key, val)
}
561636
func (r replacer) Set(key, value string) {
	r.replacements["{"+key+"}"] = value
}