// Delete removes a single record.
494175
func (m *GormPrivilegeCacheRepository) Delete(ctx context.Context, privilegeCacheID uuid.UUID) error {
	defer goa.MeasureSince([]string{"goa", "db", "privilege_cache", "delete"}, time.Now())

	obj := PrivilegeCache{PrivilegeCacheID: privilegeCacheID}
	result := m.db.Delete(obj)

	if result.Error != nil {
		log.Error(ctx, map[string]interface{}{
			"privilege_cache_id": privilegeCacheID,
			"err":                result.Error,
		}, "unable to delete the privilege cache")
		return errs.WithStack(result.Error)
	}
	if result.RowsAffected == 0 {
		return errors.NewNotFoundError("privilege_cache", fmt.Sprintf("%s", privilegeCacheID.String()))
	}

	log.Debug(ctx, map[string]interface{}{
		"privilege_cache_id": privilegeCacheID,
	}, "Privilege cache deleted!")

	return nil
}
209498
func (d *Datastore) Delete(key ds.Key) (err error) {
	return d.child.Delete(d.ConvertKey(key))
}
487586
func (r *GormQueryRepository) Delete(ctx context.Context, ID uuid.UUID) error {
	defer goa.MeasureSince([]string{"goa", "db", "query", "delete"}, time.Now())
	q := Query{ID: ID}
	tx := r.db.Delete(q)

	if err := tx.Error; err != nil {
		log.Error(ctx, map[string]interface{}{
			"query_id": ID.String(),
		}, "unable to delete the query")
		return errors.NewInternalError(ctx, err)
	}
	if tx.RowsAffected == 0 {
		log.Error(ctx, map[string]interface{}{
			"query_id": ID.String(),
		}, "no row was affected by the delete operation")
		return errors.NewNotFoundError("query", ID.String())
	}
	return nil
}
420992
func (s *Service) Delete(ctx context.Context, cluster, db, rp string) error {
	s.dbrpMappingKV.Delete(encodeDBRPMappingKey(cluster, db, rp))
	return nil
}
1005393
func (e *Err) Delete(key string) {
	if e.data != nil {
		delete(e.data, key)
	}
}
126025
func (s *memcachedStorage) Delete(key string) error {
	return s.c.Delete(key)
}
1038918
func (b *BaseBuilder) Delete(table string, where Expression) *Query {
	sql := "DELETE FROM " + b.db.QuoteTableName(table)
	params := Params{}
	if where != nil {
		w := where.Build(b.db, params)
		if w != "" {
			sql += " WHERE " + w
		}
	}
	return b.NewQuery(sql).Bind(params)
}
890139
func (s *MockStore) Delete(key string) error {
	delete(s.db, key)
	return nil
}
1243373
func (c *Client) Delete() *Request {
	req := c.Request()
	req.Method("DELETE")
	return req
}
587745
func (c *Client) Delete(key string) error {
	return c.deleteRecurse(key, false)
}
246234
func (db *DB) delete(t *batch, key []byte) int64 {
	key = db.encodeKVKey(key)
	t.Delete(key)
	return 1
}
819445
func (c *Cache) Delete(key string) {
	c.db.Delete([]byte(key), nil)
}
424082
func (c *memoryStore) Delete(id string) {
	c.Lock()
	delete(c.s, id)
	c.Unlock()
}
1262908
func (kv *KV) Delete(key []byte) error {
	return kv.db.Delete(key, nil)
}
99386
func (p *SessionStore) Delete(key string) error {
	p.Lock()
	defer p.Unlock()
	delete(p.values, key)
	return nil
}
795469
func (b *Batch) Delete(key []byte) {
	b.appendRec(keyTypeDel, key, nil)
}
1260760
func (i IntCounter) Delete(key int) bool {
	value, _ := i[key]
	if value <= 1 {
		delete(i, key)
		return true
	}
	i[key] = value - 1
	return false
}