(ctx context.Context, sg *SubGraph)
| 2778 | } |
| 2779 | |
| 2780 | func getNodeTypes(ctx context.Context, sg *SubGraph) ([]string, error) { |
| 2781 | temp := &SubGraph{ |
| 2782 | Attr: "dgraph.type", |
| 2783 | SrcUIDs: sg.DestUIDs, |
| 2784 | ReadTs: sg.ReadTs, |
| 2785 | } |
| 2786 | taskQuery, err := createTaskQuery(ctx, temp) |
| 2787 | if err != nil { |
| 2788 | return nil, err |
| 2789 | } |
| 2790 | result, err := worker.ProcessTaskOverNetwork(ctx, taskQuery) |
| 2791 | if err != nil { |
| 2792 | return nil, err |
| 2793 | } |
| 2794 | return getPredsFromVals(result.ValueMatrix), nil |
| 2795 | } |
| 2796 | |
| 2797 | // getPredicatesFromTypes returns the list of preds contained in the given types. |
| 2798 | func getPredicatesFromTypes(namespace uint64, typeNames []string) []string { |
no test coverage detected