(doneVars map[string]varValue, path []*SubGraph)
| 361 | } |
| 362 | |
| 363 | func (sg *SubGraph) processGroupBy(doneVars map[string]varValue, path []*SubGraph) error { |
| 364 | for _, ul := range sg.uidMatrix { |
| 365 | // We need to process groupby for each list as grouping needs to happen for each path of the |
| 366 | // tree. |
| 367 | |
| 368 | r, err := sg.formResult(ul) |
| 369 | if err != nil { |
| 370 | return err |
| 371 | } |
| 372 | sg.GroupbyRes = append(sg.GroupbyRes, r) |
| 373 | } |
| 374 | |
| 375 | if err := sg.fillGroupedVars(doneVars, path); err != nil { |
| 376 | return err |
| 377 | } |
| 378 | |
| 379 | // All the result that we want to return is in sg.GroupbyRes |
| 380 | sg.Children = sg.Children[:0] |
| 381 | |
| 382 | return nil |
| 383 | } |
| 384 | |
| 385 | func groupLess(a, b *groupResult) bool { |
| 386 | switch { |
no test coverage detected