MCPcopy
hub / github.com/uber/aresdb / Get

Method Get

memstore/common/data_value.go:746–751  ·  view source on GitHub ↗

Get returns the buffer pointer for the index-th item

(index int)

Source from the content-addressed store, hash-verified

744
745// Get returns the buffer pointer for the index-th item
746func (reader *ArrayValueReader) Get(index int) unsafe.Pointer {
747 if index < 0 || index >= reader.length {
748 return nil
749 }
750 return unsafe.Pointer(uintptr(reader.value) + uintptr(index*DataTypeBytes(reader.itemType)))
751}
752
753// IsValid check if the item in index-th place is valid or not
754func (reader *ArrayValueReader) IsValid(index int) bool {

Callers 2

arrayValueCompareFunction · 0.95

Calls 1

DataTypeBytesFunction · 0.85

Tested by

no test coverage detected