// Remove implements the Remove method of the eventhorizon.WriteRepo interface.
432176
func (r *Repo) Remove(ctx context.Context, id uuid.UUID) error {
	ns := r.namespace(ctx)

	r.dbMu.Lock()
	defer r.dbMu.Unlock()
	if _, ok := r.db[ns][id]; ok {
		delete(r.db[ns], id)

		index := -1
		for i, d := range r.ids[ns] {
			if id == d {
				index = i
				break
			}
		}
		r.ids[ns] = append(r.ids[ns][:index], r.ids[ns][index+1:]...)

		return nil
	}

	return eh.RepoError{
		Err:       eh.ErrEntityNotFound,
		Namespace: eh.NamespaceFromContext(ctx),
	}
}
238054
func (b *UpdateBuilder) Remove(column string) *UpdateBuilder {
	return b.removeValue(column, param(column))
}
974440
func (r *RecordList) Remove(ev EventBuilder, fn Listener) int {
	idx, rec := r.Find(ev.Name())
	if idx == -1 {
		return 0
	}

	// 1. Find the index of the listener in the list
	oldList := rec.getUnsafeList()
	spliceIndex := -1
	for i, l := range oldList {
		if l != nil && (*(*Listener)(l)) == fn {
			spliceIndex = i
			break
		}
	}

	if spliceIndex == -1 {
		return len(oldList)
	}

	newCount := len(oldList) - rec.inactiveItems - 1
	// 2. If that's the only listener, just remove that record entirely.
	if newCount == 0 {
		r.remove(idx)
		return 0
	}

	// 3. Otherwise, wipe the pointer, or make a new list copied from the parts
	// of the old if we wanted to compact it.
	if float32(rec.inactiveItems+1)/float32(len(oldList)) < compactionThreshold {
		rec.storeAtIndex(spliceIndex, nil)
		rec.inactiveItems++
		return newCount
	}

	newList := make([]unsafe.Pointer, 0, newCount)
	for i, ptr := range oldList {
		if ptr != nil && i != spliceIndex {
			newList = append(newList, ptr)
		}
	}
	rec.inactiveItems = 0
	rec.setList(newList)

	return newCount
}
1226146
func (c *ARC) Remove(key interface{}) bool {
	c.mu.Lock()
	defer c.mu.Unlock()

	return c.remove(key)
}
318491
func (u *Unit) Remove() error {
	_, err := u.RemoveWithForce(false, time.Duration(0))
	return err
}
287296
func (p *Project) Remove(c *check.C, containerID string) {
	c.Assert(p.project.Remove(containerID), check.IsNil,
		check.Commentf("error while removing the container %s", containerID))
}
542823
func (b *SampleFJSONBuilder) Remove(info *SampleFPropertyInfo) *SampleFJSONBuilder {
	delete(b._properties, info.fieldName)
	return b
}
1001838
func (l *Lambda) remove(kind, name string, m map[string]interface{}) {
	l.log(kind, name, m, '-', red)
}
150353
func (mm *methodManager) Remove(name string) {
	name = strings.ToLower(name)
	mm.mmLocker.Lock()
	n := len(mm.MethodNames)
	for i := 0; i < n; i++ {
		if strings.ToLower(mm.MethodNames[i]) == name {
			mm.MethodNames = append(mm.MethodNames[:i], mm.MethodNames[i+1:]...)
			break
		}
	}
	delete(mm.RemoteMethods, name)
	mm.mmLocker.Unlock()
}
51318
func (b *PersonJSONBuilder) Remove(info *PersonPropertyInfo) *PersonJSONBuilder {
	delete(b._properties, info.fieldName)
	return b
}
285569
func (cp *CallbackProcessor) Remove(callbackName string) {
	log.Printf("[info] removing callback `%v` from %v\n", callbackName, fileWithLineNum())
	cp.name = callbackName
	cp.remove = true
	cp.parent.processors = append(cp.parent.processors, cp)
	cp.parent.reorder()
}
850711
func (c *resourceRecordChangeset) Remove(rrs dnsprovider.ResourceRecordSet) dnsprovider.ResourceRecordChangeset {
	c.remove = append(c.remove, rrs)
	return c
}
1199710
func (r *Remover) Remove(args params.Entities) (params.ErrorResults, error) {
	result := params.ErrorResults{
		Results: make([]params.ErrorResult, len(args.Entities)),
	}
	if len(args.Entities) == 0 {
		return result, nil
	}
	canModify, err := r.getCanModify()
	if err != nil {
		return params.ErrorResults{}, errors.Trace(err)
	}
	for i, entity := range args.Entities {
		tag, err := names.ParseTag(entity.Tag)
		if err != nil {
			result.Results[i].Error = ServerError(ErrPerm)
			continue
		}
		err = ErrPerm
		if canModify(tag) {
			err = r.removeEntity(tag)
		}
		result.Results[i].Error = ServerError(err)
	}
	return result, nil
}
528493
func (service *BaseService) Remove(name string) Service {
	service.methodManager.Remove(name)
	return service
}
385375
func (b *TodoJSONBuilder) Remove(infos ...*TodoPropertyInfo) *TodoJSONBuilder {
	for _, info := range infos {
		delete(b._properties, info.fieldName)
	}
	return b
}
529565
func (l *List) Remove() error {
	// Remove the table
	_, err := l.host.db.Exec("DROP TABLE " + l.table)
	return err
}
68482
func Remove(sess Session, w http.ResponseWriter) {
	Global.Remove(sess, w)
}