// Remove deletes the value for the associated key, returning true if it was
// removed or false if the entry doesn't exist.
180371
func (c *Ctrie) Remove(key []byte) (interface{}, bool) {
	c.assertReadWrite()
	return c.remove(&Entry{Key: key, hash: c.hash(key)})
}
497851
func (c *Container) remove(v uint16) (removed bool) {
	if c.isArray() {
		removed = c.arrayRemove(v)
	} else if c.isRun() {
		removed = c.runRemove(v)
	} else {
		removed = c.bitmapRemove(v)
	}
	return removed
}
1055372
func (r *MemoryNoTS) Delete(key string) error {
	delete(r.items, key)
	return nil
}
1183747
func (c *Conn) Remove(key string) error {
	code, body, err := c.doREST("DELETE", key, nil)
	if err != nil {
		return err
	}
	if code == 404 {
		return ErrNotFound
	}
	if code != 204 {
		return &Error{string(body), code}
	}
	return nil
}
1258412
func (kv *keyValue) Delete(key string) error {
	kv.mu.Lock()
	defer kv.mu.Unlock()
	err := kv.db.Remove(&bson.M{mgoKey: key})
	if err == mgo.ErrNotFound {
		return nil
	}
	return err
}
101002
func (c *cache) remove(key string) {
	if cached, ok := c.items[key]; ok {
		delete(c.items, key)
		c.size -= cached.item.Size()
		c.keyList.Remove(cached.element)
	}
}
590777
func (d *Dtrie) Remove(key interface{}) *Dtrie {
	root := remove(d.root, d.hasher(key), key)
	return &Dtrie{root, d.hasher}
}
523028
func (c *Cache) Remove(key string) bool {
	c.Lock()
	defer c.Unlock()
	elem, ok := c.m[key]
	if !ok {
		return false
	}
	c.removeElement(elem)
	return true
}
471874
func (d *StateDir) Remove() error {
	if err := os.Remove(d.path); err != nil && !os.IsNotExist(err) {
		return err
	}
	// If atomic delete succeeded, update own state.
	d.state.Members = nil
	return nil
}
539186
func (c *Scratch) Delete(key string) string {
	c.mu.Lock()
	delete(c.values, key)
	c.mu.Unlock()
	return ""
}
1318737
func (m *txSortedMap) Remove(nonce uint64) bool {
	// Short circuit if no transaction is present
	_, ok := m.items[nonce]
	if !ok {
		return false
	}
	// Otherwise delete the transaction and fix the heap index
	for i := 0; i < m.index.Len(); i++ {
		if (*m.index)[i] == nonce {
			heap.Remove(m.index, i)
			break
		}
	}
	delete(m.items, nonce)
	m.cache = nil

	return true
}
256596
func (m *SyncIdentityMap) Remove(key interface{}) {
	m.Lock()
	keyPtr := genKey(key)
	delete(m.m, keyPtr)
	m.Unlock()
}
314951
func (c *Connector) Remove(ctx context.Context, ei *dosa.EntityInfo, keys map[string]dosa.FieldValue) error {
	err := validateSchema(ei)
	if err != nil {
		return err
	}
	keyName, _ := nameOfKeyValue(ei)
	cacheKey, err := buildKey(c.keyPrefix, ei.Ref.Scope, ei.Ref.NamePrefix, ei.Def.Name, keys[keyName])
	if err != nil {
		return err
	}

	err = c.client.Del(cacheKey)
	c.logCallCount("Remove", err)
	return err
}
830633
func (c *Cache) Remove(key string) bool {
	if c.cache == nil {
		return false
	}

	if ele, hit := c.cache[key]; hit {
		c.removeElement(ele)
		return true
	}

	return false
}
1126384
func (c *Connector) Remove(ctx context.Context, ei *dosa.EntityInfo, keys map[string]dosa.FieldValue) error {
	// convert the key values from interface{} to RPC's Value
	rpcFields, err := keyValuesToRPCValues(keys)
	if err != nil {
		return err
	}

	// perform the remove request
	removeRequest := &dosarpc.RemoveRequest{
		Ref:       entityInfoToSchemaRef(ei),
		KeyValues: rpcFields,
	}

	err = c.client.Remove(ctx, removeRequest, getHeaders(c.headers)...)
	if err != nil {
		if !dosarpc.Dosa_Remove_Helper.IsException(err) {
			return errors.Wrap(err, "failed to Remove due to network issue")
		}

		return errors.Wrap(err, "failed to Remove")
	}
	return nil
}
737180
func (s *Set) Remove(key interface{}) (ok bool) {
	_, ok = s.skiplist.Delete(key)
	return ok
}
569382
func (lru *TTLRUCache) Remove(key interface{}) {
	lru.lock.Lock()
	defer lru.lock.Unlock()

	if element, ok := lru.mapping[key]; ok {
		lru.order.Remove(&element.orderelement)
		lru.timeorder.Remove(&element.timeelement)
		delete(lru.mapping, element.key)
		lru.triplePool.Put(element)
	}
}