#1100 - Refactor OrmQueryPlanKey to use string expression for where

This commit is contained in:
rob bygrave
2017-08-31 02:11:49 +12:00
parent a695fb59b2
commit f83c7fdac8
54 changed files with 359 additions and 723 deletions
@@ -1,6 +1,5 @@
package io.ebeaninternal.server.expression;
import io.ebeaninternal.api.HashQueryPlanBuilder;
import io.ebeaninternal.api.ManyWhereJoins;
import io.ebeaninternal.api.SpiExpression;
import io.ebeaninternal.api.SpiExpressionRequest;
@@ -68,9 +67,8 @@ class IdExpression extends NonPrepareExpression implements SpiExpression {
* No properties so this is just a unique static number.
*/
@Override
public void queryPlanHash(HashQueryPlanBuilder builder) {
builder.add(IdExpression.class);
builder.bind(1);
public void queryPlanHash(StringBuilder builder) {
builder.append("Id[]");
}
@Override
@@ -78,11 +76,6 @@ class IdExpression extends NonPrepareExpression implements SpiExpression {
return value.hashCode();
}
@Override
public boolean isSameByPlan(SpiExpression other) {
return other instanceof IdExpression;
}
@Override
public boolean isSameByBind(SpiExpression other) {
IdExpression that = (IdExpression) other;