(enc *encoder, vals []*pb.TaskValue, dst fastJsonNode)
| 1312 | } |
| 1313 | |
| 1314 | func (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 | |
| 1329 | func alreadySeen(parentIds []uint64, uid uint64) bool { |
| 1330 | for _, id := range parentIds { |
no test coverage detected