public static Set<Scoping.Variable> getVariableLocations(final Traversal.Admin<?, ?> traversal) { return TraversalHelper.getVariableLocations(EnumSet.noneOf(Scoping.Variable.class), traversal); }
@Override public ElementRequirement getMaxRequirement() { return TraversalHelper.getVariableLocations(this.whereTraversal).contains(Scoping.Variable.START) ? PathProcessor.super.getMaxRequirement() : ElementRequirement.ID; }
} else if (startStep instanceof MatchStep) { for (final Traversal.Admin<?, ?> global : ((MatchStep<?, ?>) startStep).getGlobalChildren()) { TraversalHelper.getVariableLocations(variables, global); TraversalHelper.getVariableLocations(variables, local);
/** * Filters the current object based on the object itself or the path history. * * @param whereTraversal the filter to apply * @return the traversal with an appended {@link WherePredicateStep} * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#where-step" target="_blank">Reference Documentation - Where Step</a> * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#using-where-with-match" target="_blank">Reference Documentation - Where with Match</a> * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#using-where-with-select" target="_blank">Reference Documentation - Where with Select</a> * @since 3.0.0-incubating */ public default GraphTraversal<S, E> where(final Traversal<?, ?> whereTraversal) { this.asAdmin().getBytecode().addStep(Symbols.where, whereTraversal); return TraversalHelper.getVariableLocations(whereTraversal.asAdmin()).isEmpty() ? this.asAdmin().addStep(new TraversalFilterStep<>(this.asAdmin(), (Traversal) whereTraversal)) : this.asAdmin().addStep(new WhereTraversalStep<>(this.asAdmin(), whereTraversal)); }
public static Set<Scoping.Variable> getVariableLocations(final Traversal.Admin<?, ?> traversal) { return TraversalHelper.getVariableLocations(EnumSet.noneOf(Scoping.Variable.class), traversal); }
@Override public ElementRequirement getMaxRequirement() { return TraversalHelper.getVariableLocations(this.whereTraversal).contains(Scoping.Variable.START) ? PathProcessor.super.getMaxRequirement() : ElementRequirement.ID; }
@Override public ElementRequirement getMaxRequirement() { return TraversalHelper.getVariableLocations(this.whereTraversal).contains(Scoping.Variable.START) ? PathProcessor.super.getMaxRequirement() : ElementRequirement.ID; }
@Override public ElementRequirement getMaxRequirement() { return TraversalHelper.getVariableLocations(this.whereTraversal).contains(Scoping.Variable.START) ? PathProcessor.super.getMaxRequirement() : ElementRequirement.ID; }
} else if (startStep instanceof MatchStep) { for (final Traversal.Admin<?, ?> global : ((MatchStep<?, ?>) startStep).getGlobalChildren()) { TraversalHelper.getVariableLocations(variables, global); TraversalHelper.getVariableLocations(variables, local);
/** * Filters the current object based on the object itself or the path history. * * @param whereTraversal the filter to apply * @return the traversal with an appended {@link WherePredicateStep} * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#where-step" target="_blank">Reference Documentation - Where Step</a> * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#using-where-with-match" target="_blank">Reference Documentation - Where with Match</a> * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#using-where-with-select" target="_blank">Reference Documentation - Where with Select</a> * @since 3.0.0-incubating */ public default GraphTraversal<S, E> where(final Traversal<?, ?> whereTraversal) { this.asAdmin().getBytecode().addStep(Symbols.where, whereTraversal); return TraversalHelper.getVariableLocations(whereTraversal.asAdmin()).isEmpty() ? this.asAdmin().addStep(new TraversalFilterStep<>(this.asAdmin(), (Traversal) whereTraversal)) : this.asAdmin().addStep(new WhereTraversalStep<>(this.asAdmin(), whereTraversal)); }