mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
[skip ci] Add comment for PayloadReader (#12869)
Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
This commit is contained in:
parent
29c68eb901
commit
ccf957e1a8
@ -399,11 +399,13 @@ func (r *PayloadReader) GetDataFromPayload(idx ...int) (interface{}, int, error)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ReleasePayloadReader release payload reader.
|
||||||
func (r *PayloadReader) ReleasePayloadReader() error {
|
func (r *PayloadReader) ReleasePayloadReader() error {
|
||||||
status := C.ReleasePayloadReader(r.payloadReaderPtr)
|
status := C.ReleasePayloadReader(r.payloadReaderPtr)
|
||||||
return HandleCStatus(&status, "ReleasePayloadReader failed")
|
return HandleCStatus(&status, "ReleasePayloadReader failed")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetBoolFromPayload returns bool slice from payload.
|
||||||
func (r *PayloadReader) GetBoolFromPayload() ([]bool, error) {
|
func (r *PayloadReader) GetBoolFromPayload() ([]bool, error) {
|
||||||
if r.colType != schemapb.DataType_Bool {
|
if r.colType != schemapb.DataType_Bool {
|
||||||
return nil, errors.New("incorrect data type")
|
return nil, errors.New("incorrect data type")
|
||||||
@ -421,6 +423,7 @@ func (r *PayloadReader) GetBoolFromPayload() ([]bool, error) {
|
|||||||
return slice, nil
|
return slice, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetInt8FromPayload returns int8 slice from payload
|
||||||
func (r *PayloadReader) GetInt8FromPayload() ([]int8, error) {
|
func (r *PayloadReader) GetInt8FromPayload() ([]int8, error) {
|
||||||
if r.colType != schemapb.DataType_Int8 {
|
if r.colType != schemapb.DataType_Int8 {
|
||||||
return nil, errors.New("incorrect data type")
|
return nil, errors.New("incorrect data type")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user