// HMSet command:
// Sets the specified fields to their respective values in the hash stored at key.
// This command overwrites any existing fields in the hash.
// If key does not exist, a new key holding a hash is created.
555886
func (r *Redis) HMSet(key string, pairs map[string]string) error {
	args := packArgs("HMSET", key, pairs)
	rp, err := r.ExecuteCommand(args...)
	if err != nil {
		return err
	}
	return rp.OKValue()
}
1012909
func (b *UpdateBuilder) Set(columns ...string) *UpdateBuilder {
	for _, c := range columns {
		b.assignments = append(b.assignments, assignment{
			column: c,
			value:  param(c),
		})
	}

	return b
}
542971
func (m metadataTextMap) Set(key, val string) {
	// gRPC allows for complex binary values to be written.
	encodedKey, encodedVal := encodeKeyValue(key, val)
	// The metadata object is a multimap, and previous values may exist, but for opentracing headers, we do not append
	// we just override.
	m[encodedKey] = []string{encodedVal}
}
1251302
func (d *Data) Set(key string, value string) {
	d.Values.Set(key, value)
}
1329555
func (hm *SyncedHashMap) Set(key Hashable, value interface{}) {
	hm.Lock()
	defer hm.Unlock()
	(*hm).keys[key.Hash()] = key
	(*hm).values[key.Hash()] = value
}
516320
func (h Hash) Set(key string, value interface{}) Hash {
	h[key] = Value(valueToBytes(value))
	return h
}
143659
func (t *TxStructure) Set(key []byte, value []byte) error {
	if t.readWriter == nil {
		return errWriteOnSnapshot
	}
	ek := t.encodeStringDataKey(key)
	return t.readWriter.Set(ek, value)
}
889156
func (ha *hashAlgoFlag) Set(value string) error {
	val := api.HashAlgo_value[strings.ToUpper(value)]
	if val == 0 {
		return fmt.Errorf("unknown hash algo %q, should be one of: %s", value, allAlgos)
	}
	*ha = hashAlgoFlag(val)
	return nil
}
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
}
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++
}
16693
func (m *Miniredis) HSet(k, f, v string) {
	m.DB(m.selectedDB).HSet(k, f, v)
}
543755
function hmset(key /* field-1, value-1, field-N, value-N, req */) {
  var args = slice.call(arguments, 1)
    , req = typeof args[args.length - 1] === 'object'
        ? args.pop() : null
    , val = this.getKey(key, req)
    , i;

  if(!val) {
    val = new HashMap();
    this.setKey(key, val, undefined, undefined, undefined, req);
  }
  for(i = 0;i < args.length;i+=2) {
    val.setKey(args[i], args[i + 1]);
  }
  return OK;
}
1256132
func (s *Session) Set(key string, value interface{}) {
	if s.data == nil {
		s.data = make(Data)
	}
	s.changed = true
	s.data[key] = value
}
1285703
func (s *Settings) Set(key, value string) {
	s.settings[key] = value
}
797116
func (bhm *BlockHashMap) Set(loc BlockLocation, data []byte) {
	bhm.mutex.Lock()
	defer bhm.mutex.Unlock()

	if bhm.data[loc.FileIndex] == nil {
		bhm.data[loc.FileIndex] = make(map[int64][]byte)
	}
	bhm.data[loc.FileIndex][loc.BlockIndex] = data
}
1017976
func (c *Client) MGet(keys ...string) ([]string, error) {
	tmp := make([]interface{}, len(keys)+1)
	tmp[0] = "MGET"
	for n, k := range keys {
		tmp[n+1] = k
	}
	v, err := c.execOnFirst(true, tmp...)
	if err != nil {
		return nil, err
	}
	switch v.(type) {
	case []interface{}:
		items := v.([]interface{})
		resp := make([]string, len(items))
		for n, item := range items {
			switch item.(type) {
			case string:
				resp[n] = item.(string)
			}
		}
		return resp, nil
	}
	return nil, ErrServerError
}
705149
func (f *FieldHeaderNames) Set(value string) error {
	// When arguments are passed through YAML, escaped double quotes
	// might be added to this string, and they would break the last
	// key/value pair. This ensures the string is clean.
	value = strings.Trim(value, "\"")

	fields := strings.Fields(value)

	for _, field := range fields {
		n := strings.SplitN(field, "=", 2)
		(*f)[n[0]] = n[1]
	}

	return nil
}