@Override public void visit( Relike relike ) { strategy.visit(relike); enqueue(relike.getOperand1()); enqueue(relike.getOperand2()); visitNext(); }
@Override public void visit( Relike relike ) { strategy.visit(relike); enqueue(relike.getOperand1()); enqueue(relike.getOperand2()); visitNext(); }
@Override public void visit( Relike relike ) { append("RELIKE("); relike.getOperand1().accept(this); append(','); relike.getOperand2().accept(this); append(')'); }
@Override public void visit( Relike relike ) { append("RELIKE("); relike.getOperand1().accept(this); append(','); relike.getOperand2().accept(this); append(')'); }
@Test public void shouldParseSelectStarFromSingleSourceWithWhereRelikeConstraint() { query = parse("SELECT * FROM car:Car WHERE relike('test-model', car:model)"); assertThat(query.source(), is(instanceOf(NamedSelector.class))); // SELECT * ... assertThat(query.columns().isEmpty(), is(true)); // FROM ... NamedSelector selector = (NamedSelector)query.source(); assertThat(selector.name(), is(selectorName("car:Car"))); assertThat(selector.aliasOrName(), is(selectorName("car:Car"))); assertThat(selector.alias(), is(nullValue())); // WHERE ... Relike relike = isRelike(query.constraint()); assertThat(relike.getOperand1(), is((StaticOperand)literal("test-model"))); assertThat(relike.getOperand2(), is((DynamicOperand)propertyValue(selectorName("car:Car"), "car:model"))); }
Relike relike = (Relike)constraint; StaticOperand op1 = relike.getOperand1(); PropertyValue op2 = relike.getOperand2(); StaticOperand newOp1 = replaceSubqueriesWithBindVariables(context, op1, subqueriesByVariableName); if (op1 == newOp1) return relike;
Relike relike = (Relike)constraint; StaticOperand op1 = relike.getOperand1(); PropertyValue op2 = relike.getOperand2(); StaticOperand newOp1 = replaceSubqueriesWithBindVariables(context, op1, subqueriesByVariableName); if (op1 == newOp1) return relike;
Relike relike = (Relike)constraint; StaticOperand op1 = relike.getOperand1(); PropertyValue op2 = relike.getOperand2(); PropertyValue newOp2 = replaceAliasesWithProperties(context, op2, propertyByAlias); if (op2 == newOp2) return relike;
Relike relike = (Relike)constraint; StaticOperand op1 = relike.getOperand1(); PropertyValue op2 = relike.getOperand2(); PropertyValue newOp2 = replaceAliasesWithProperties(context, op2, propertyByAlias); if (op2 == newOp2) return relike;
PropertyValue propertyValue = relike.getOperand2(); NameFactory names = context.getExecutionContext().getValueFactories().getNameFactory(); final Name propertyName = names.create(propertyValue.getPropertyName());
PropertyValue propertyValue = relike.getOperand2(); NameFactory names = context.getExecutionContext().getValueFactories().getNameFactory(); final Name propertyName = names.create(propertyValue.getPropertyName());