Alpha attempt at in and out predicates.

This commit is contained in:
Allon Hadaya 2015-04-26 16:07:15 -04:00
parent 86ae24f59d
commit f775756ad1
3 changed files with 29 additions and 0 deletions

View file

@ -40,6 +40,8 @@ func (wk *worker) embedTraversals(env *otto.Otto, obj *otto.Object) {
obj.Set("SaveR", wk.gremlinFunc("saver", obj, env))
obj.Set("Except", wk.gremlinFunc("except", obj, env))
obj.Set("Difference", wk.gremlinFunc("except", obj, env))
obj.Set("InPredicates", wk.gremlinFunc("in_predicates", obj, env))
obj.Set("OutPredicates", wk.gremlinFunc("out_predicates", obj, env))
}
func (wk *worker) gremlinFunc(kind string, prev *otto.Object, env *otto.Otto) func(otto.FunctionCall) otto.Value {