addNode appends a new node to the plan and returns it.
(op Operation, group string, deps ...*PlanNode)
| 123 | |
| 124 | // addNode appends a new node to the plan and returns it. |
| 125 | func (p *Plan) addNode(op Operation, group string, deps ...*PlanNode) *PlanNode { |
| 126 | p.nextID++ |
| 127 | node := &PlanNode{ |
| 128 | ID: p.nextID, |
| 129 | Operation: op, |
| 130 | DependsOn: deps, |
| 131 | Group: group, |
| 132 | } |
| 133 | p.Nodes = append(p.Nodes, node) |
| 134 | return node |
| 135 | } |
| 136 | |
| 137 | // String renders the plan as a human-readable graph for testing and debugging. |
| 138 | // |
no outgoing calls