// Delete removes the k's KV pair, if it exists, in which case Delete returns
// true.
343978
func (t *Tree) Delete(k []byte) (ok bool) {
	pi := -1
	var p *x
	q := t.r
	if q == nil {
		return false
	}

	for {
		var i int
		i, ok = t.find(q, k)
		if ok {
			switch x := q.(type) {
			case *x:
				if x.c < kx && q != t.r {
					x, i = t.underflowX(p, x, pi, i)
				}
				pi = i + 1
				p = x
				q = x.x[pi].ch
				ok = false
				continue
			case *d:
				t.extract(x, i)
				if x.c >= kd {
					return true
				}

				if q != t.r {
					t.underflow(p, x, pi)
				} else if t.c == 0 {
					t.Clear()
				}
				return true
			}
		}

		switch x := q.(type) {
		case *x:
			if x.c < kx && q != t.r {
				x, i = t.underflowX(p, x, pi, i)
			}
			pi = i
			p = x
			q = x.x[i].ch
		case *d:
			return false
		}
	}
}
367563
func (wb *WriteBatch) Delete(key []byte) {
	cKey := byteToChar(key)
	C.rocksdb_writebatch_delete(wb.c, cKey, C.size_t(len(key)))
}
706944
func (l *SimpleLRUCache) Delete(key Key) {
	k := string(key.Hash())
	element := l.elements[k]
	if element == nil {
		return
	}
	l.cache.Remove(element)
	delete(l.elements, k)
	l.size--
}
587745
func (c *Client) Delete(key string) error {
	return c.deleteRecurse(key, false)
}
215251
func (kv *KV) Delete(key []byte) error {
	return kv.db.Update(func(tx *buntdb.Tx) error {
		_, err := tx.Delete(gkv.Btos(key))
		return err
	})
}
1055372
func (r *MemoryNoTS) Delete(key string) error {
	delete(r.items, key)
	return nil
}
393175
func (bk *Bucket) Delete(k []byte) error {
	return bk.db.Update(func(tx *bolt.Tx) error {
		return tx.Bucket(bk.Name).Delete(k)
	})
}
695975
func (c *NodbCacher) Delete(key string) error {
	_, err := c.db.Del([]byte(key))
	return err
}
553181
func (set *StringSet) Delete(element string) bool {
	_, found := set.set[element]
	if found {
		delete(set.set, element)
	}
	return found
}
896059
func (r *MemoryTTL) Delete(key string) error {
	r.Lock()
	defer r.Unlock()

	r.delete(key)
	return nil
}
669872
func (c *InMemoryCache) Delete(ctx context.Context, key Key) bool {
	if _, found := c.Get(ctx, key); found {
		c.mu.Lock()
		defer c.mu.Unlock()
		delete(c.items, key.String())
		return true
	}
	return false
}
635387
func (c *Cacher) Delete(key string, recursive bool) []string {
	c.mu.Lock()
	defer c.mu.Unlock()
	var keys []string

	if recursive {
		for k := range c.data {
			if strings.HasPrefix(k, key) {
				delete(c.data, k)
				keys = append(keys, k)
			}
		}
	} else {
		if _, ok := c.data[key]; ok {
			delete(c.data, key)
			keys = append(keys, key)
		}
	}
	return keys
}
15049
func (b *batch) Delete(key []byte) error {
	b.b.Delete(key)
	b.size++
	return nil
}
155981
func (m *Mem) Delete(key models.Key) error {
	m.mut.Lock()
	defer m.mut.Unlock()
	delete(m.m, key.String())
	return nil
}
521207
func (s *Store) Delete(key, dataType interface{}) error {
	return s.Bolt().Update(func(tx *bolt.Tx) error {
		return s.TxDelete(tx, key, dataType)
	})
}
184875
func (c *Cache) Delete(key string) {
	key = keyToFilename(key)
	c.d.Erase(key)
}
1320541
func (c *Cache) Delete(key string) (err error) {
	return c.caches(c.Name, "items", key).Req("DELETE", nil, nil)
}