MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / addCheckPwd

Method addCheckPwd

query/outputnode.go:1314–1327  ·  view source on GitHub ↗
(enc *encoder, vals []*pb.TaskValue, dst fastJsonNode)

Source from the content-addressed store, hash-verified

1312}
1313
1314func (sg *SubGraph) addCheckPwd(enc *encoder, vals []*pb.TaskValue, dst fastJsonNode) error {
1315 c := types.ValueForType(types.BoolID)
1316 if len(vals) == 0 {
1317 c.Value = false
1318 } else {
1319 c.Value = task.ToBool(vals[0])
1320 }
1321
1322 fieldName := sg.Params.Alias
1323 if fieldName == "" {
1324 fieldName = fmt.Sprintf("checkpwd(%s)", sg.Attr)
1325 }
1326 return enc.AddValue(dst, enc.idForAttr(fieldName), c)
1327}
1328
1329func alreadySeen(parentIds []uint64, uid uint64) bool {
1330 for _, id := range parentIds {

Callers 1

preTraverseMethod · 0.80

Calls 4

ValueForTypeFunction · 0.92
ToBoolFunction · 0.92
AddValueMethod · 0.80
idForAttrMethod · 0.80

Tested by

no test coverage detected