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

Function getValue

query/query.go:369–374  ·  view source on GitHub ↗

getValue gets the value from the task.

(tv *pb.TaskValue)

Source from the content-addressed store, hash-verified

367
368// getValue gets the value from the task.
369func getValue(tv *pb.TaskValue) (types.Val, error) {
370 vID := types.TypeID(tv.ValType)
371 val := types.ValueForType(vID)
372 val.Value = tv.Val
373 return val, nil
374}
375
376var (
377 // ErrEmptyVal is returned when a value is empty.

Callers 2

convertToFunction · 0.70
updateValInNQuadsFunction · 0.50

Calls 2

TypeIDTypeAlias · 0.92
ValueForTypeFunction · 0.92

Tested by

no test coverage detected