MCPcopy
hub / github.com/dgraph-io/dgraph / getScalarVal

Method getScalarVal

query/outputnode.go:439–450  ·  view source on GitHub ↗
(fj fastJsonNode)

Source from the content-addressed store, hash-verified

437}
438
439func (enc *encoder) getScalarVal(fj fastJsonNode) ([]byte, error) {
440 offset := uint32(fj.meta & setBytes4321)
441 data, err := enc.arena.get(offset)
442 if err != nil {
443 return nil, err
444 }
445 if (fj.meta & uidNodeBit) > 0 {
446 uid := binary.BigEndian.Uint64(data)
447 return x.ToHex(uid, false), nil
448 }
449 return data, nil
450}
451
452func (enc *encoder) getList(fj fastJsonNode) bool {
453 return (fj.meta & listBit) > 0

Callers 8

encodeMethod · 0.95
encodeMethod · 0.80
extractDgraphTypesMethod · 0.80
writeCustomFieldMethod · 0.80
TestFastJsonNodeFunction · 0.80

Calls 2

ToHexFunction · 0.92
getMethod · 0.45

Tested by 1

TestFastJsonNodeFunction · 0.64