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

Method recursiveFillVars

query/query.go:1745–1763  ·  view source on GitHub ↗

recursiveFillVars fills the value of variables before a query is to be processed using the result of the values (doneVars) computed by other queries that were successfully run before this query.

(doneVars map[string]varValue)

Source from the content-addressed store, hash-verified

1743// recursiveFillVars fills the value of variables before a query is to be processed using the result
1744// of the values (doneVars) computed by other queries that were successfully run before this query.
1745func (sg *SubGraph) recursiveFillVars(doneVars map[string]varValue) error {
1746 err := sg.fillVars(doneVars)
1747 if err != nil {
1748 return err
1749 }
1750 for _, child := range sg.Children {
1751 err = child.recursiveFillVars(doneVars)
1752 if err != nil {
1753 return err
1754 }
1755 }
1756 for _, fchild := range sg.Filters {
1757 err = fchild.recursiveFillVars(doneVars)
1758 if err != nil {
1759 return err
1760 }
1761 }
1762 return nil
1763}
1764
1765// fillShortestPathVars reads value of the uid variable from mp map and fills it into From and To
1766// parameters.

Callers 1

ProcessQueryMethod · 0.80

Calls 1

fillVarsMethod · 0.95

Tested by

no test coverage detected