(val *api.Value)
| 183 | } |
| 184 | |
| 185 | func getTypeVal(val *api.Value) (types.Val, error) { |
| 186 | p := dql.TypeValFrom(val) |
| 187 | // Convert value to bytes |
| 188 | |
| 189 | if p.Tid == types.GeoID || p.Tid == types.DateTimeID { |
| 190 | // Already in bytes format |
| 191 | p.Value = p.Value.([]byte) |
| 192 | return p, nil |
| 193 | } |
| 194 | |
| 195 | p1 := types.ValueForType(types.BinaryID) |
| 196 | if err := types.Marshal(p, &p1); err != nil { |
| 197 | return p1, err |
| 198 | } |
| 199 | |
| 200 | p1.Value = p1.Value.([]byte) |
| 201 | p1.Tid = p.Tid |
| 202 | return p1, nil |
| 203 | } |
| 204 | |
| 205 | func createUidEdge(nq *api.NQuad, sid, oid uint64) *pb.DirectedEdge { |
| 206 | return &pb.DirectedEdge{ |
no test coverage detected