Expose LabelContext in gremlin

This commit is contained in:
Barak Michener 2015-10-30 17:16:40 -04:00
parent 36d0f48d15
commit 283aca83c2
5 changed files with 28 additions and 4 deletions

View file

@ -163,6 +163,12 @@ func buildPathFromObject(obj *otto.Object) *path.Path {
return p.InPredicates()
case "OutPredicates":
return p.OutPredicates()
case "LabelContext":
labels, tags, ok := getViaData(obj)
if !ok {
return nil
}
return p.LabelContextWithTags(tags, labels...)
default:
panic(fmt.Sprint("Unimplemented Gremlin function", gremlinType))
}