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)
| 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. |
| 1745 | func (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. |