MCPcopy Create free account
hub / github.com/pingcap/tidb / GetKeys

Method GetKeys

pkg/types/json_binary.go:276–283  ·  view source on GitHub ↗

GetKeys gets the keys of the object

()

Source from the content-addressed store, hash-verified

274
275// GetKeys gets the keys of the object
276func (bj BinaryJSON) GetKeys() BinaryJSON {
277 count := bj.GetElemCount()
278 ret := make([]BinaryJSON, 0, count)
279 for i := 0; i < count; i++ {
280 ret = append(ret, CreateBinaryJSON(string(bj.objectGetKey(i))))
281 }
282 return buildBinaryJSONArray(ret)
283}
284
285// GetElemCount gets the count of Object or Array.
286func (bj BinaryJSON) GetElemCount() int {

Callers 6

vecEvalJSONMethod · 0.95
TestGetKeysFunction · 0.80
getReqStartKeyFunction · 0.80
vecEvalJSONMethod · 0.80
evalJSONMethod · 0.80
evalJSONMethod · 0.80

Calls 4

GetElemCountMethod · 0.95
objectGetKeyMethod · 0.95
CreateBinaryJSONFunction · 0.85
buildBinaryJSONArrayFunction · 0.85

Tested by 1

TestGetKeysFunction · 0.64