// Set moves the cursor with s.Cursor().Get(k, v, opset), and sets s.Key(),
// s.Val(), and s.Err() accordingly.  The cursor will not move in the next call
// to Scan.
172283
func (s *Scanner) Set(k, v []byte, opset uint) bool {
	if !s.checkOpen() {
		return false
	}
	s.set = true
	s.key, s.val, s.err = s.cur.Get(k, v, opset)
	return s.err == nil
}
1363341
func (e wrappedError) Set(key string, val interface{}) {
	e.context[key] = val
}
412038
func Set(c cookoo.Context, p *cookoo.Params) (interface{}, cookoo.Interrupt) {
	key := p.Get("key", "").(string)
	value := p.Get("value", "").(string)
	ttl := p.Get("ttl", uint64(20)).(uint64)
	client := p.Get("client", nil).(Setter)

	res, err := client.Set(key, value, ttl)
	if err != nil {
		log.Infof(c, "Failed to set %s=%s", key, value)
		return res, err
	}

	return res, nil
}
1314964
func (ds *DataScope) Set(key string, v interface{}) error {
	ds.Data[key] = v
	return nil
}
748725
func (query Query) Set(field string, value interface{}) Query {
	if query.Changes == nil {
		query.Changes = make(map[string]interface{})
	}

	query.Changes[field] = value
	return query
}
680981
func (h *mapHandler) Set(key string, value interface{}, args ...interface{}) error {
	if len(args) != 0 {
		return cfg.ErrArgsNotSupported
	}
	h.values[key] = value
	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
}
576002
func (c *Client) Set(key, val string, flags, exp uint32, ocas uint64) (cas uint64, err error) {
	// Variants: [R] Set [Q]
	return c.setGeneric(opSet, key, val, ocas, flags, exp)
}
579991
func (c *Context) Set(key string, value interface{}) {
	c.Context = context.WithValue(c.Context, key, value)
}
208787
func (i *Int8) Set(value int8) {
	i.lock.Lock()
	defer i.lock.Unlock()
	i.increment = value
}
226799
func (s scope) set(k string, v data.Value) {
	s[len(s)-1].vars[k] = v
}
1192623
func (u *User) Set(key string, value interface{}) {
	// Get map shard.
	u.Lock()
	defer u.Unlock()
	u.data[key] = value
}
251846
func (c *Context) Set(key string, value interface{}) {
	c.store.set(key, value)
}
573763
func (kv *KeyValue) Set(key, value string) error {
	if kv.name == nil {
		return ErrDoesNotExist
	}
	return (*bbolt.DB)(kv.db).Update(func(tx *bbolt.Tx) error {
		bucket := tx.Bucket(kv.name)
		if bucket == nil {
			return ErrBucketNotFound
		}
		return bucket.Put([]byte(key), []byte(value))
	})
}
5950
func (m *Map) Set(k KeyType, v ValueType) {
	m.set(k, v, mapKeyOptions{
		copyKey:     true,
		finalizeKey: m.finalize != nil,
	})
}
192554
func (c *Ctx) Set(key interface{}, value interface{}) {
	c.request = c.request.WithContext(context.WithValue(c.request.Context(), key, value))
}
886529
func (c *Cursor) Set(pos *Position) error {
	if pos == nil {
		return errors.New("invalid position")
	}
	pi := -1
	for i, p := range c.ps {
		if p.Equal(&pos.Prefix) {
			pi = i
			break
		}
	}
	if pi == -1 || !c.ps[pi].IPNet.Contains(pos.IP) {
		return errors.New("position out of range")
	}
	c.set(pi, pos.IP.To16())
	return nil
}