// Remove removes the entire database.
// If the database does not exist, a NotFoundError is returned.
975129
func (d *database) Remove(ctx context.Context) error {
	req, err := d.conn.NewRequest("DELETE", path.Join("_db/_system/_api/database", pathEscape(d.name)))
	if err != nil {
		return WithStack(err)
	}
	resp, err := d.conn.Do(ctx, req)
	if err != nil {
		return WithStack(err)
	}
	if err := resp.CheckStatus(200); err != nil {
		return WithStack(err)
	}
	return nil
}
561267
func (b *BarJSONBuilder) Remove(info *BarPropertyInfo) *BarJSONBuilder {
	delete(b._properties, info.fieldName)
	return b
}
737180
func (s *Set) Remove(key interface{}) (ok bool) {
	_, ok = s.skiplist.Delete(key)
	return ok
}
1136540
func (b *FooJSONBuilder) Remove(info *FooPropertyInfo) *FooJSONBuilder {
	delete(b._properties, info.fieldName)
	return b
}
493648
func (l *List) Remove() error {
	err := (*bbolt.DB)(l.db).Update(func(tx *bbolt.Tx) error {
		return tx.DeleteBucket(l.name)
	})
	// Mark as removed by setting the name to nil
	l.name = nil
	return err
}
530682
func (c *Config) Remove(key string) (value interface{}, ok bool) {
	return c.values.Remove(c.NewKey(key))
}
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
}
1325001
func Remove(name string) error {
	log.Debugf("Removing repository %q", name)
	if err := removeBare(name); err != nil {
		log.Errorf("repository.Remove: Error removing bare repository %q: %s", name, err)
	}
	conn, err := db.Conn()
	if err != nil {
		return err
	}
	defer conn.Close()
	if err := conn.Repository().RemoveId(name); err != nil {
		if err == mgo.ErrNotFound {
			return ErrRepositoryNotFound
		}
		return err
	}
	return nil
}
218271
func (s *secrets) Remove(secrets []string) {
	s.mu.Lock()
	defer s.mu.Unlock()
	for _, secret := range secrets {
		delete(s.m, secret)
	}
}
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
}
598665
func (t *PlatformsTable) remove(c context.Context) error {
	// Avoid using the database connection to prepare unnecessary statements.
	if len(t.removals) == 0 {
		return nil
	}

	db := database.Get(c)
	stmt, err := db.PrepareContext(c, `
		DELETE FROM platforms
		WHERE id = ?
	`)
	if err != nil {
		return errors.Annotate(err, "failed to prepare statement").Err()
	}
	defer stmt.Close()

	// Remove each platform from the table. It's more efficient to update the slice of
	// platforms once at the end rather than for each removal, so use a defer.
	removed := make(map[int64]struct{}, len(t.removals))
	defer func() {
		var platforms []*Platform
		for _, p := range t.current {
			if _, ok := removed[p.Id]; !ok {
				platforms = append(platforms, p)
			}
		}
		t.current = platforms
	}()
	for len(t.removals) > 0 {
		p := t.removals[0]
		if _, err := stmt.ExecContext(c, p.Id); err != nil {
			// Defer ensures the slice of platforms is updated even if we exit early.
			return errors.Annotate(err, "failed to remove platform %q", p.Name).Err()
		}
		removed[p.Id] = struct{}{}
		t.removals = t.removals[1:]
		logging.Infof(c, "Removed platform %q", p.Name)
	}
	return nil
}
406288
func (c *modelStateCollection) Remove(query interface{}) error {
	return c.WriteCollection.Remove(c.mungeQuery(query))
}
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
}
459010
func (s *stringSet) Remove(vs ...string) {
	for _, v := range vs {
		delete(s.values, v)
	}
}
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()
}
267052
func (c *ServiceConfigs) Remove(name string) {
	c.mu.Lock()
	delete(c.m, name)
	c.mu.Unlock()
}
1150685
func (a *AnimationSystem) Remove(basic ecs.BasicEntity) {
	if a.entities != nil {
		delete(a.entities, basic.ID())
	}
}