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

Function getNodeTypes

query/query.go:2780–2795  ·  view source on GitHub ↗
(ctx context.Context, sg *SubGraph)

Source from the content-addressed store, hash-verified

2778}
2779
2780func 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.
2798func getPredicatesFromTypes(namespace uint64, typeNames []string) []string {

Callers 2

expandSubgraphFunction · 0.85
ExpandEdgesFunction · 0.85

Calls 3

ProcessTaskOverNetworkFunction · 0.92
createTaskQueryFunction · 0.85
getPredsFromValsFunction · 0.85

Tested by

no test coverage detected