// Delete is part of the topo.Conn interface.
977383
func (zs *Server) Delete(ctx context.Context, filePath string, version topo.Version) error {
	zkPath := path.Join(zs.root, filePath)

	// Interpret the version
	var zkVersion int32
	if version != nil {
		zkVersion = int32(version.(ZKVersion))
	} else {
		zkVersion = -1
	}

	if err := zs.conn.Delete(ctx, zkPath, zkVersion); err != nil {
		return convertError(err, zkPath)
	}
	return zs.recursiveDeleteParentIfEmpty(ctx, filePath)
}
570380
func (db *BytesConnectionRedis) Delete(key string, opts ...datasync.DelOption) (found bool, err error) {
	if db.closed {
		return false, fmt.Errorf("Delete(%s) called on a closed connection", key)
	}
	db.Debugf("Delete(%s)", key)

	keysToDelete := []string{}

	var keyIsPrefix bool
	for _, o := range opts {
		if _, ok := o.(*datasync.WithPrefixOpt); ok {
			keyIsPrefix = true
		}
	}
	if keyIsPrefix {
		iterator, err := db.ListKeys(key)
		if err != nil {
			return false, err
		}
		for {
			k, _, last := iterator.GetNext()
			if last {
				break
			}
			keysToDelete = append(keysToDelete, k)
		}
		if len(keysToDelete) == 0 {
			return false, nil
		}
		db.Debugf("Delete(%s): deleting %v", key, keysToDelete)
	} else {
		keysToDelete = append(keysToDelete, key)
	}

	intCmd := db.client.Del(keysToDelete...)
	if intCmd.Err() != nil {
		return false, fmt.Errorf("Delete(%s) failed: %s", key, intCmd.Err())
	}
	return (intCmd.Val() != 0), nil
}
977080
func (f *Fibre) Delete(p string, h HandlerFunc) {
	f.router.Add(DELETE, p, h)
}
539373
func (db *Storage) Delete(ctxt Context, val interface{}) error {
	ctxt = debugContext(ctxt)
	t, _, err := db.findType(val, "Delete")
	if err != nil {
		return err
	}

	var buf bytes.Buffer
	var args []interface{}
	rval := reflect.ValueOf(val).Elem()

	fmt.Fprintf(&buf, "delete from %q where ", t.name)
	sep := ""
	for _, col := range t.fields {
		if !col.key {
			continue
		}
		args = append(args, rval.FieldByIndex(col.index).Interface())
		fmt.Fprintf(&buf, "%s%q = ?", sep, col.name)
		sep = " and "
	}

	_, err = ctxt.Exec(buf.String(), args...)
	return err
}
162892
func (s *IPDirectionalPoolsService) Delete(k IPDirectionalPoolKey) (*http.Response, error) {
	return s.client.delete(k.URI(), nil)
}
227218
func (b *Backend) Delete(ctx context.Context, key string) error {
	defer metrics.MeasureSince(metricDelete, time.Now())

	// Pooling
	b.permitPool.Acquire()
	defer b.permitPool.Release()

	// Delete
	m := spanner.Delete(b.table, spanner.Key{key})
	if _, err := b.client.Apply(ctx, []*spanner.Mutation{m}); err != nil {
		return errwrap.Wrapf("failed to delete key: {{err}}", err)
	}

	return nil
}
899324
func (n NamespacedKV) Delete(key string) {
	n.db.Delete(n.prefixedKey(key), nil)
}
816686
func (h *DBHandle) Delete(key []byte, sync bool) error {
	return h.db.Delete(constructLevelKey(h.dbName, key), sync)
}
180800
func (c *Connection) Delete(path string) error {
	c.RLock()
	defer c.RUnlock()
	if err := c.isClosed(); err != nil {
		return err
	}
	return c.delete(path)
}
41585
func (m *mem) Delete(_ context.Context, path string) error {
	m.Lock()
	delete(m.data, path)
	m.Unlock()
	return nil
}
1237396
func (r *Route) Delete(handler http.Handler) *Route {
	r.handlers[http.MethodDelete] = handler
	return r
}
229682
func (ops *vsphereOps) Delete(diskPath string) error {
	return ops.deleteInternal(diskPath, ops.cfg.VMUUID)
}
443866
func (b *Bucket) Delete(k string) error {
	return b.Write(k, 0, 0, nil, Raw)
}
819445
func (c *Cache) Delete(key string) {
	c.db.Delete([]byte(key), nil)
}
776685
func (m *Map) Delete(key interface{}) {
	if m.m == nil {
		return
	}
	delete(m.m, key)
}
1221761
func (h Handler) Delete(cmd common.DeleteRequest) error {
	_, err := h.doRequest(cmd, common.RequestDelete)
	return err
}
354862
func (c *ZkConn) Delete(ctx context.Context, path string, version int32) error {
	return c.withRetry(ctx, func(conn *zk.Conn) error {
		return conn.Delete(path, version)
	})
}