MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / Del

Method Del

engine/grpc/client/string.go:76–89  ·  view source on GitHub ↗

Del deletes a key-value pair from the db by client api

(key string)

Source from the content-addressed store, hash-verified

74
75// Del deletes a key-value pair from the db by client api
76func (c *Client) Del(key string) error {
77 client, err := newGrpcClient(c.Addr)
78 if err != nil {
79 return err
80 }
81 del, err := client.Del(context.Background(), &gstring.DelRequest{Key: key})
82 if err != nil {
83 return err
84 }
85 if !del.Ok {
86 return errors.New("del failed")
87 }
88 return nil
89}
90
91func (c *Client) StrLen(key string) (int32, error) {
92 client, err := newGrpcClient(c.Addr)

Callers

nothing calls this directly

Calls 2

newGrpcClientFunction · 0.85
DelMethod · 0.65

Tested by

no test coverage detected