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

Method AddMapChild

query/outputnode.go:499–515  ·  view source on GitHub ↗
(fj, val fastJsonNode)

Source from the content-addressed store, hash-verified

497}
498
499func (enc *encoder) AddMapChild(fj, val fastJsonNode) {
500 var childNode fastJsonNode
501 child := enc.children(fj)
502 for child != nil {
503 if enc.getAttr(child) == enc.getAttr(val) {
504 childNode = child
505 break
506 }
507 child = child.next
508 }
509
510 if childNode == nil {
511 enc.addChildren(fj, val)
512 } else {
513 enc.addChildren(childNode, enc.children(val))
514 }
515}
516
517func (enc *encoder) AddListChild(fj, child fastJsonNode) {
518 enc.setList(child, true)

Callers 2

attachFacetsMethod · 0.95
preTraverseMethod · 0.80

Calls 3

childrenMethod · 0.95
getAttrMethod · 0.95
addChildrenMethod · 0.95

Tested by

no test coverage detected