Skip to content

Commit

Permalink
remo
Browse files Browse the repository at this point in the history
  • Loading branch information
maksim.konovalov committed Jan 10, 2025
1 parent 4f9379f commit 7d43511
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,27 +214,10 @@ type VshardRouterCallResp struct {

// Get returns a response from user defined function as []interface{}.
func (r VshardRouterCallResp) Get() ([]interface{}, error) {
readBuffer := bytes.NewBuffer(r.buf.Bytes())
var result []interface{}
err := r.GetTyped(&result)

decoder := msgpack.GetDecoder()
decoder.Reset(readBuffer)
defer msgpack.PutDecoder(decoder)

arrLen, err := decoder.DecodeArrayLen()
if err != nil {
return nil, err
}

result := make([]interface{}, arrLen)

for i := 0; i < arrLen; i++ {
result[i], err = decoder.DecodeInterface()
if err != nil {
return nil, err
}
}

return result, nil
return result, err
}

// GetTyped decodes a response from user defined function into custom values.
Expand Down

0 comments on commit 7d43511

Please sign in to comment.