// RemoveRecord implements table.Table RemoveRecord interface.
188171
func (t *tableCommon) RemoveRecord(ctx sessionctx.Context, h int64, r []types.Datum) error {
	err := t.removeRowData(ctx, h)
	if err != nil {
		return err
	}
	err = t.removeRowIndices(ctx, h, r)
	if err != nil {
		return err
	}

	ctx.StmtAddDirtyTableOP(table.DirtyTableDeleteRow, t.physicalTableID, h, nil)
	if shouldWriteBinlog(ctx) {
		cols := t.Cols()
		colIDs := make([]int64, 0, len(cols)+1)
		for _, col := range cols {
			colIDs = append(colIDs, col.ID)
		}
		var binlogRow []types.Datum
		if !t.meta.PKIsHandle {
			colIDs = append(colIDs, model.ExtraHandleID)
			binlogRow = make([]types.Datum, 0, len(r)+1)
			binlogRow = append(binlogRow, r...)
			binlogRow = append(binlogRow, types.NewIntDatum(h))
		} else {
			binlogRow = r
		}
		err = t.addDeleteBinlog(ctx, binlogRow, colIDs)
	}
	colSize := make(map[int64]int64)
	for id, col := range t.Cols() {
		val := -int64(len(r[id].GetBytes()))
		if val != 0 {
			colSize[col.ID] = val
		}
	}
	ctx.GetSessionVars().TxnCtx.UpdateDeltaForTable(t.physicalTableID, -1, 1, colSize)
	return err
}
1144286
func (t *tOps) remove(fd storage.FileDesc) {
	t.cache.Delete(0, uint64(fd.Num), func() {
		if err := t.s.stor.Remove(fd); err != nil {
			t.s.logf("table@remove removing @%d %q", fd.Num, err)
		} else {
			t.s.logf("table@remove removed @%d", fd.Num)
		}
		if t.evictRemoved && t.bcache != nil {
			t.bcache.EvictNS(uint64(fd.Num))
		}
	})
}
1232130
func (s *PredictInput) SetRecord(v map[string]*string) *PredictInput {
	s.Record = v
	return s
}
910081
func (t *Table) RemoveRow(row int) *Table {
	if row < 0 || row >= len(t.cells) {
		return t
	}

	t.cells = append(t.cells[:row], t.cells[row+1:]...)

	return t
}
476927
func removeDNSRecords(nameList string, dnsProvider protokube.DNSProvider) {
	for {
		var removeRecords []dns.Record
		for _, s := range strings.Split(nameList, ",") {
			s = strings.TrimSpace(s)
			if s == "" {
				continue
			}

			removeRecords = append(removeRecords, dns.Record{
				FQDN:       s,
				RecordType: dns.RecordTypeA,
			})
		}

		if len(removeRecords) == 0 {
			return
		}

		if err := dnsProvider.RemoveRecordsImmediate(removeRecords); err != nil {
			glog.Warningf("error removing records %q, will retry: %v", nameList, err)
		} else {
			glog.Infof("removed DNS records %q", nameList)
			return
		}
		time.Sleep(5 * time.Second)
	}
}
861856
func (rc *Connector) RemoveRange(ctx context.Context, ei *dosa.EntityInfo, columnConditions map[string][]*dosa.Condition) error {
	connector, err := rc.getConnector(ei.Ref.Scope, ei.Ref.NamePrefix)
	if err != nil {
		return err
	}
	return connector.RemoveRange(ctx, ei, columnConditions)
}
29799
func (k *Store) Remove(key string) {
	k.mu.Lock()
	defer k.mu.Unlock()

	delete(k.db, key)
	k.logChange(removeOperation, key, nil)
}
43106
func (c *client) RemoveRange(ctx context.Context, r *RemoveRangeOp) error {
	if !c.initialized {
		return &ErrNotInitialized{}
	}

	// look up the entity in the registry
	re, err := c.registrar.Find(r.object)
	if err != nil {
		return errors.Wrap(err, "RemoveRange")
	}

	// now convert the client range columns to server side column conditions structure
	columnConditions, err := ConvertConditions(r.conditions, re.table)
	if err != nil {
		return errors.Wrap(err, "RemoveRange")
	}

	return errors.Wrap(c.connector.RemoveRange(ctx, re.EntityInfo(), columnConditions), "RemoveRange")
}
445674
func (c *Client) DeleteDNSRecord(domain string, recordID int) error {
	values := url.Values{
		"domain":   {domain},
		"RECORDID": {fmt.Sprintf("%v", recordID)},
	}

	if err := c.post(`dns/delete_record`, values, nil); err != nil {
		return err
	}
	return nil
}
1347400
func (a *multiwatcherStore) Remove(id multiwatcher.EntityId) {
	if elem := a.entities[id]; elem != nil {
		entry := elem.Value.(*entityEntry)
		if entry.removed {
			return
		}
		a.latestRevno++
		if entry.refCount == 0 {
			a.delete(id)
			return
		}
		entry.revno = a.latestRevno
		entry.removed = true
		a.list.MoveToFront(elem)
	}
}
867656
func (h *SessionHandle) DropBindRecord(record *BindRecord) {
	meta := &BindMeta{BindRecord: record}
	meta.Status = deleted
	hash := parser.DigestHash(record.OriginalSQL)
	h.ch.removeDeletedBindMeta(hash, meta)
	h.appendBindMeta(hash, meta)
}
808526
func (r ReferenceStorage) RemoveReference(n plumbing.ReferenceName) error {
	r.deleted[n] = struct{}{}
	return r.temporal.RemoveReference(n)
}
772819
func (r *Record) Delete(args ...string) (err error) {
	switch len(args) {
	case 0:
		_, err = r.Client.Delete(r.uri("/records"), nil)
	case 1:
		_, err = r.Client.Delete(r.uri("/records/%s", args...), nil)
	case 2:
		_, err = r.Client.Delete(r.uri("/records/%s/%s", args...), nil)
	default:
		err = r.formatCallError("Delete", args...)
	}
	return
}
492892
func (s *OAuth2Storage) RemoveRefresh(token string) error {
	return Db().Where(&OAuth2RefreshToken{Token: token}).Delete(OAuth2RefreshToken{})
}
724553
func (s *DbSession) Remove(query Q, document Document) error {
	return s.collection(document.CollectionName()).Remove(query)
}
953548
func (r *RegistrationDB) RemoveProducer(k Registration, id string) (bool, int) {
	r.Lock()
	defer r.Unlock()
	producers, ok := r.registrationMap[k]
	if !ok {
		return false, 0
	}
	removed := false
	if _, exists := producers[id]; exists {
		removed = true
	}

	// Note: this leaves keys in the DB even if they have empty lists
	delete(producers, id)
	return removed, len(producers)
}
465012
func (windows *windowsRecord) Remove() (string, error) {
	removeAction := "Removing " + windows.description + ":"

	m, err := mgr.Connect()
	if err != nil {
		return removeAction + failed, getWindowsError(err)
	}
	defer m.Disconnect()
	s, err := m.OpenService(windows.name)
	if err != nil {
		return removeAction + failed, getWindowsError(err)
	}
	defer s.Close()
	err = s.Delete()
	if err != nil {
		return removeAction + failed, getWindowsError(err)
	}

	return removeAction + " completed.", nil
}