// Interface for Deletion
330977
func (m *dbConn) Delete(key driver.Value) (int, error) {
	txn := m.db.Txn(true)
	err := txn.Delete(m.md.tbl.Name, key)
	if err != nil {
		txn.Abort()
		u.Warnf("could not delete: %v  err=%v", key, err)
		return 0, err
	}
	txn.Commit()
	return 1, nil
}
1353326
func (as *AgentServer) Delete(ctx context.Context, deleteRequest *pb.DeleteDatasetShardRequest) (*pb.DeleteDatasetShardResponse, error) {

	log.Println("deleting", deleteRequest.Name)
	as.storageBackend.DeleteNamedDatasetShard(deleteRequest.Name)
	as.inMemoryChannels.Cleanup(deleteRequest.Name)

	return &pb.DeleteDatasetShardResponse{}, nil
}
1300398
func (s *GenericStorage) Delete(key interface{}) error {
	if s.del == nil && s.delMulti == nil {
		return errors.Newf(
			"'%s' does not have Delete/DeleteMulti implementation",
			s.name)
	}

	s.rwMutex.Lock()
	defer s.rwMutex.Unlock()

	if s.del != nil {
		return s.del(key)
	}
	return s.delMulti(key)
}
1271373
func (c *ConfigEntry) Delete(args *structs.ConfigEntryRequest, reply *struct{}) error {
	if done, err := c.srv.forward("ConfigEntry.Delete", args, args, reply); done {
		return err
	}
	defer metrics.MeasureSince([]string{"config_entry", "delete"}, time.Now())

	// Normalize the incoming entry.
	if err := args.Entry.Normalize(); err != nil {
		return err
	}

	// Fetch the ACL token, if any.
	rule, err := c.srv.ResolveToken(args.Token)
	if err != nil {
		return err
	}
	if rule != nil && !args.Entry.CanWrite(rule) {
		return acl.ErrPermissionDenied
	}

	args.Op = structs.ConfigEntryDelete
	resp, err := c.srv.raftApply(structs.ConfigEntryRequestType, args)
	if err != nil {
		return err
	}
	if respErr, ok := resp.(error); ok {
		return respErr
	}
	return nil
}
1315960
func (hhc *Client) Delete(url string, headers http.Header) (*http.Response, error) {
	var response *http.Response
	request, err := http.NewRequest(http.MethodDelete, url, nil)
	if err != nil {
		return response, errors.Wrap(err, "DELETE - request creation failed")
	}

	request.Header = headers

	return hhc.Do(request)
}
90262
func (bsh *BufferedServerHeader) Del(key string) {
	if bsh.released {
		bsh.original.Del(key)
	} else {
		delete(bsh.headerMap, key)
	}
}
793412
func (m *Mux) Delete(pattern string, handler http.HandlerFunc) {
	m.Handle(http.MethodDelete, pattern, handler)
}
1012648
func (r *Request) Delete(url string) (*Response, error) {
	return r.Execute(MethodDelete, url)
}
1081480
func (f *FakeDeleter) Delete(name string) error {
	f.NsDeleted = append(f.NsDeleted, name)
	return f.Err
}
795469
func (b *Batch) Delete(key []byte) {
	b.appendRec(keyTypeDel, key, nil)
}
835461
func (c *RawBinaryClient) Delete(key string) MutateResponse {
	c.mutex.Lock()
	defer c.mutex.Unlock()

	if resp := c.sendDeleteRequest(key); resp != nil {
		return resp
	}

	return c.receiveMutateResponse(opDelete, key)
}
821649
func (self *DocumentBase) Delete() error {

	if self.Id.Valid() {

		self.SetDeleted(true)

		return self.Save()
	}

	return errors.New("Invalid object id")
}
843871
func (c *Client) DeleteIndex(indices ...string) *IndicesDeleteService {
	return NewIndicesDeleteService(c).Index(indices)
}
529707
func (r *Redis) Del(keys ...string) (int64, error) {
	args := packArgs("DEL", keys)
	rp, err := r.ExecuteCommand(args...)
	if err != nil {
		return 0, err
	}
	return rp.IntegerValue()
}
471618
func del(db keyval.ProtoBroker, data string) {
	c := &phonebook.Contact{Name: data}

	key := phonebook.EtcdContactPath(c)

	existed, err := db.Delete(key)
	if err != nil {
		log.Fatal(err)
	} else if !existed {
		fmt.Println("Not existed")
		return
	}

	fmt.Println("Deleted:", key)
}
1373382
func (m *MemoryStorer) Del(key string) error {
	m.mut.Lock()
	delete(m.sessions, key)
	m.mut.Unlock()

	return nil
}
513699
func (s *ObjectsClient) Delete(ctx context.Context, input *DeleteObjectInput) error {
	absPath := absFileInput(s.client.AccountName, input.ObjectPath)

	headers := &http.Header{}
	for key, value := range input.Headers {
		headers.Set(key, value)
	}

	reqInput := client.RequestInput{
		Method:  http.MethodDelete,
		Path:    string(absPath),
		Headers: headers,
	}
	respBody, _, err := s.client.ExecuteRequestStorage(ctx, reqInput)
	if respBody != nil {
		defer respBody.Close()
	}
	if err != nil {
		return errors.Wrap(err, "unable to delete object")
	}

	return nil
}