choose
Route a traverser to a particular traversal branch option.
Synopsis
choose(traversal,choice\_1,choice\_2,choice\_3)
Description
The choose() step is a branch step that can be used to route a traverser to a particular traversal branch, similar to if-then-else logic.
Examples
g.V().hasLabel('store').as('store').
V().hasLabel('ingredient').as('ingredient').
choose(where(__.in('isStockedWith').as('store')),
constant('Y'), constant('N')).as('in stock').
select('store','ingredient','in stock').
by('name').
by('name').
by()