MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / mathCopy

Function mathCopy

query/query.go:441–456  ·  view source on GitHub ↗
(dst *mathTree, src *dql.MathTree)

Source from the content-addressed store, hash-verified

439}
440
441func mathCopy(dst *mathTree, src *dql.MathTree) error {
442 // Either we'll have an operation specified, or the function specified.
443 dst.Const = src.Const
444 dst.Fn = src.Fn
445 dst.Val = src.Val
446 dst.Var = src.Var
447
448 for _, mc := range src.Child {
449 child := &mathTree{}
450 if err := mathCopy(child, mc); err != nil {
451 return err
452 }
453 dst.Child = append(dst.Child, child)
454 }
455 return nil
456}
457
458func filterCopy(sg *SubGraph, ft *dql.FilterTree) error {
459 // Either we'll have an operation specified, or the function specified.

Callers 1

treeCopyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…