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

Function recursiveCopy

query/query.go:2020–2036  ·  view source on GitHub ↗
(dst *SubGraph, src *SubGraph)

Source from the content-addressed store, hash-verified

2018}
2019
2020func recursiveCopy(dst *SubGraph, src *SubGraph) {
2021 dst.Attr = src.Attr
2022 dst.Params = src.Params
2023 dst.Params.ParentVars = make(map[string]varValue)
2024 for k, v := range src.Params.ParentVars {
2025 dst.Params.ParentVars[k] = v
2026 }
2027
2028 dst.copyFiltersRecurse(src)
2029 dst.ReadTs = src.ReadTs
2030
2031 for _, c := range src.Children {
2032 copyChild := new(SubGraph)
2033 recursiveCopy(copyChild, c)
2034 dst.Children = append(dst.Children, copyChild)
2035 }
2036}
2037
2038func expandSubgraph(ctx context.Context, sg *SubGraph) ([]*SubGraph, error) {
2039 span := trace.SpanFromContext(ctx)

Callers 1

expandSubgraphFunction · 0.85

Calls 1

copyFiltersRecurseMethod · 0.80

Tested by

no test coverage detected