MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / copyFastJsonList

Method copyFastJsonList

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

Source from the content-addressed store, hash-verified

849}
850
851func (enc *encoder) copyFastJsonList(fj fastJsonNode) (fastJsonNode, int) {
852 if fj == nil {
853 return fj, 0
854 }
855
856 var head, tail fastJsonNode
857 nodeCount := 0
858
859 for fj != nil {
860 nodeCount++
861 nn := enc.copySingleNode(fj)
862 if tail == nil {
863 head, tail = nn, nn
864 fj = fj.next
865 continue
866 }
867 tail.next = nn
868 fj, tail = fj.next, tail.next
869 }
870
871 return head, nodeCount
872}
873
874func (enc *encoder) copySingleNode(fj fastJsonNode) fastJsonNode {
875 if fj == nil {

Callers 1

mergeMethod · 0.95

Calls 1

copySingleNodeMethod · 0.95

Tested by

no test coverage detected