// Remove removes a transaction from the lookup.
8565
func (t *txLookup) Remove(hash common.Hash) {
	t.lock.Lock()
	defer t.lock.Unlock()

	delete(t.all, hash)
}
44159
func remove(args [][]byte, txn *mdb.Txn) ([]byte, error) {
	dbName := string(args[0])
	dbi, err := txn.DBIOpen(&dbName, mdb.CREATE) // create if not exists
	if err != nil {
		txn.Abort()
		return nil, err
	}
	err = txn.Del(dbi, args[1], nil)
	if err != nil {
		txn.Abort()
		return nil, err
	}
	return nil, txn.Commit()
}
1274877
func (rl *List) Remove() error {
	conn := rl.pool.Get(rl.dbindex)
	_, err := conn.Do("DEL", rl.id)
	return err
}
739118
func (m *idManager) remove(i uint64) *queue.TxBuffer {
	if i >= uint64(len(m.ids)) {
		return nil
	}

	desc := &m.ids[i]
	b := desc.buf
	if b == nil {
		// The provided id is not currently assigned.
		return nil
	}

	desc.buf = nil
	desc.nextFree = m.freeList
	m.freeList = i

	return b
}
122535
func (kv *KeyValue) Remove() error {
	// Remove the table
	_, err := kv.host.db.Exec(fmt.Sprintf("DROP TABLE %s", pq.QuoteIdentifier(kvPrefix+kv.table)))
	return err
}
304492
func (cache *mapTxCache) Remove(tx types.Tx) {
	cache.mtx.Lock()
	txHash := txKey(tx)
	popped := cache.map_[txHash]
	delete(cache.map_, txHash)
	if popped != nil {
		cache.list.Remove(popped)
	}

	cache.mtx.Unlock()
}
129930
func (m *MultiMap) Remove(key interface{}, value interface{}) {
	set, found := m.m[key]
	if found {
		delete(set, value)
	}
	if len(m.m[key]) == 0 {
		delete(m.m, key)
	}
}
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)
	}
}
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)
	}
}
629766
func (c *Client) Remove(name string) error {
	return delete(c, name, false)
}
1019948
func (c *keyValueChanger) Remove() error {
	if c.err != nil {
		return c.err
	}
	return c.node.remove()
}
409283
func (m *Machine) Remove() (err error) {
	defer errors.DeferredAnnotatef(&err, "cannot remove machine %s", m.doc.Id)
	logger.Tracef("removing machine %q", m.Id())
	// Local variable so we can re-get the machine without disrupting
	// the caller.
	machine := m
	buildTxn := func(attempt int) ([]txn.Op, error) {
		if attempt != 0 {
			machine, err = machine.st.Machine(machine.Id())
			if errors.IsNotFound(err) {
				// The machine's gone away, that's fine.
				return nil, jujutxn.ErrNoOperations
			}
			if err != nil {
				return nil, errors.Trace(err)
			}
		}
		ops, err := machine.removeOps()
		if err != nil {
			return nil, errors.Trace(err)
		}
		return ops, nil
	}
	return m.st.db().Run(buildTxn)
}
973627
func (s *Subnet) Remove() (err error) {
	defer errors.DeferredAnnotatef(&err, "cannot remove subnet %q", s)

	if s.doc.Life != Dead {
		return errors.New("subnet is not dead")
	}

	ops := []txn.Op{{
		C:      subnetsC,
		Id:     s.doc.DocID,
		Remove: true,
		Assert: isDeadDoc,
	}}
	if s.doc.ProviderId != "" {
		op := s.st.networkEntityGlobalKeyRemoveOp("subnet", s.ProviderId())
		ops = append(ops, op)
	}

	txnErr := s.st.db().RunTransaction(ops)
	if txnErr == nil {
		return nil
	}
	return onAbort(txnErr, errors.New("not found or not dead"))
}
927080
func (rh *HashMap) Remove() error {
	conn := rh.pool.Get(rh.dbindex)
	// Find all hashmap keys that starts with rh.id+":"
	results, err := redis.Values(conn.Do("KEYS", rh.id+":*"))
	if err != nil {
		return err
	}
	// For each key id
	for i := 0; i < len(results); i++ {
		// Delete this key
		if _, err = conn.Do("DEL", getString(results, i)); err != nil {
			return err
		}
	}
	return nil
}
1068902
func (r *Repo) Remove(ctx context.Context, id uuid.UUID) error {
	r.RemoveCalled = true
	if r.SaveErr != nil {
		return r.SaveErr
	}
	r.Entity = nil
	return nil
}
166290
func (ec *externalControllers) Remove(controllerUUID string) error {
	ops := []txn.Op{{
		C:      externalControllersC,
		Id:     controllerUUID,
		Remove: true,
	}}
	err := ec.st.db().RunTransaction(ops)
	return errors.Annotate(err, "failed to remove external controller")
}
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
}