// Delete remove profile from Database
339941
func (crud *repo) Delete(profile service.Entity) error {
	return dbconn.DB.Delete(&profile).Error
}
1070554
func (s *REST) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error) {
	identity, _, user, _, _, mappingErr := s.getRelatedObjects(ctx, name, &metav1.GetOptions{})

	if mappingErr != nil {
		return nil, false, mappingErr
	}

	// Disassociate the identity with the user first
	// If this fails, Delete is re-entrant
	if removeIdentityFromUser(identity, user) {
		if _, err := s.userClient.Update(user); err != nil {
			return nil, false, err
		}
	}

	// Remove the user association from the identity last.
	// If this fails, log the error, but continue, because Delete is no longer re-entrant
	// At this point, the mapping for the identity no longer exists
	if unsetIdentityUser(identity) {
		if _, err := s.identityClient.Update(identity); err != nil {
			utilruntime.HandleError(fmt.Errorf("error removing user reference %s from identity %s: %v", user.Name, identity.Name, err))
		}
	}

	return &metav1.Status{Status: metav1.StatusSuccess}, true, nil
}
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
	})
}
1267711
func (db *DB) Delete(name []byte) error {
	return db.Update(func(tx *bolt.Tx) error {
		return tx.DeleteBucket(name)
	})
}
923473
func (s *DBStore) Delete(key string) (err error) {
	return s.db.Delete([]byte(key), nil)
}
506299
func (m *Manager) Delete(u *User) error {
	if u.ID == "" {
		return errors.New("User not stored")
	}

	return m.getUserCollection().RemoveId(u.ID)
}
99386
func (p *SessionStore) Delete(key string) error {
	p.Lock()
	defer p.Unlock()
	delete(p.values, key)
	return nil
}
459882
func (kv *KV) Delete(key []byte) error {
	return kv.db.Update(func(txn *badger.Txn) error {
		return txn.Delete(key)
	})
}
819445
func (c *Cache) Delete(key string) {
	c.db.Delete([]byte(key), nil)
}
1224784
func (c *DbClient) Delete(path, key string) {
	c.Lock()
	defer c.Unlock()

	fileData, ok := c.db[path]
	if !ok {
		return
	}
	delete(fileData, key)
}
999618
func (cache *policyCache) delete(identity *identityPkg.Identity) bool {
	cache.Lock()
	defer cache.Unlock()
	_, ok := cache.policies[identity.ID]
	if ok {
		delete(cache.policies, identity.ID)
	}
	return ok
}
948076
func (t *Table) Delete(columns ...string) (stmt string, names []string) {
	return qb.Delete(t.metadata.Name).Columns(columns...).Where(t.primaryKeyCmp...).ToCql()
}
1173352
func (db *GoLevelDB) Delete(key []byte) {
	key = nonNilBytes(key)
	err := db.db.Delete(key, nil)
	if err != nil {
		cmn.PanicCrisis(err)
	}
}
501242
func (kv *KV) Delete(key []byte) error {
	return kv.db.Erase(gkv.Btos(key))
}
63549
func (pdb *prefixDB) Delete(key []byte) {
	pdb.mtx.Lock()
	defer pdb.mtx.Unlock()

	pdb.db.Delete(pdb.prefixed(key))
}
1365237
func (s *Store) Delete(ctx context.Context, name string) error {
	return s.delete(ctx, name, false)
}
1114618
func (rdb RethinkDB) Delete(gun data.GUN) error {
	resp, err := gorethink.DB(rdb.dbName).Table(RDBTUFFile{}.TableName()).GetAllByIndex(
		"gun", gun.String(),
	).Delete().RunWrite(rdb.sess)
	if err != nil {
		return fmt.Errorf("unable to delete %s from database: %s", gun.String(), err.Error())
	}
	if resp.Deleted > 0 {
		return rdb.writeChange(gun.String(), 0, "", changeCategoryDeletion)
	}
	return nil
}