(uid, pred string)
| 59 | } |
| 60 | |
| 61 | func (gc *GrpcClient) QuerySingleVectorsUsingUid(uid, pred string) ([][]float32, error) { |
| 62 | vectorQuery := fmt.Sprintf(` |
| 63 | { |
| 64 | vector(func: uid(%v)) { |
| 65 | uid |
| 66 | %v |
| 67 | } |
| 68 | }`, uid[1:len(uid)-1], pred) |
| 69 | |
| 70 | resp, err := gc.Query(vectorQuery) |
| 71 | if err != nil { |
| 72 | return [][]float32{}, err |
| 73 | } |
| 74 | |
| 75 | return UnmarshalVectorResp(resp) |
| 76 | } |
| 77 | |
| 78 | func UnmarshalVectorResp(resp *api.Response) ([][]float32, error) { |
| 79 | type Data struct { |