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

Function frontBackSplit

query/outputnode.go:180–196  ·  view source on GitHub ↗
(source fastJsonNode,
	frontRef *fastJsonNode, backRef *fastJsonNode)

Source from the content-addressed store, hash-verified

178}
179
180func frontBackSplit(source fastJsonNode,
181 frontRef *fastJsonNode, backRef *fastJsonNode) {
182 slow := source
183 fast := source.next
184
185 for fast != nil {
186 fast = fast.next
187 if fast != nil {
188 slow = slow.next
189 fast = fast.next
190 }
191 }
192
193 *frontRef = source
194 *backRef = slow.next
195 slow.next = nil
196}
197
198func (enc *encoder) idForAttr(attr string) uint16 {
199 if attr == "uid" && enc.uidAttr > 0 {

Callers 1

MergeSortMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected