mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#566 - Refactor internals - SpiExpression, add prepareExpression() to merge queryAutoTuneHash() and queryPlanHash() - initial
This commit is contained in:
+3
-1
@@ -42,8 +42,10 @@ public class DefaultExampleExpressionTest extends BaseTestCase {
|
||||
|
||||
|
||||
BeanQueryRequest<?> request = create(query, desc);
|
||||
expr.prepareExpression(request);
|
||||
|
||||
HashQueryPlanBuilder builder = new HashQueryPlanBuilder();
|
||||
expr.queryPlanHash(request, builder);
|
||||
expr.queryPlanHash(builder);
|
||||
|
||||
TDSpiExpressionRequest req = new TDSpiExpressionRequest(desc);
|
||||
expr.addBindValues(req);
|
||||
|
||||
@@ -20,10 +20,10 @@ public class InExpressionTest {
|
||||
InExpression ex2 = new InExpression("bar", values, false);
|
||||
|
||||
HashQueryPlanBuilder b1 = new HashQueryPlanBuilder();
|
||||
ex1.queryPlanHash(null, b1);
|
||||
ex1.queryPlanHash(b1);
|
||||
|
||||
HashQueryPlanBuilder b2 = new HashQueryPlanBuilder();
|
||||
ex2.queryPlanHash(null, b2);
|
||||
ex2.queryPlanHash(b2);
|
||||
|
||||
assertNotEquals(b1.build(), b2.build());
|
||||
}
|
||||
@@ -38,10 +38,10 @@ public class InExpressionTest {
|
||||
InExpression ex2 = new InExpression("foo", values2, false);
|
||||
|
||||
HashQueryPlanBuilder b1 = new HashQueryPlanBuilder();
|
||||
ex1.queryPlanHash(null, b1);
|
||||
ex1.queryPlanHash(b1);
|
||||
|
||||
HashQueryPlanBuilder b2 = new HashQueryPlanBuilder();
|
||||
ex2.queryPlanHash(null, b2);
|
||||
ex2.queryPlanHash(b2);
|
||||
|
||||
assertNotEquals(b1.build(), b2.build());
|
||||
}
|
||||
@@ -55,10 +55,10 @@ public class InExpressionTest {
|
||||
InExpression ex2 = new InExpression("foo", values, false);
|
||||
|
||||
HashQueryPlanBuilder b1 = new HashQueryPlanBuilder();
|
||||
ex1.queryPlanHash(null, b1);
|
||||
ex1.queryPlanHash(b1);
|
||||
|
||||
HashQueryPlanBuilder b2 = new HashQueryPlanBuilder();
|
||||
ex2.queryPlanHash(null, b2);
|
||||
ex2.queryPlanHash(b2);
|
||||
|
||||
assertNotEquals(b1.build(), b2.build());
|
||||
}
|
||||
@@ -72,10 +72,10 @@ public class InExpressionTest {
|
||||
InExpression ex2 = new InExpression("foo", values, true);
|
||||
|
||||
HashQueryPlanBuilder b1 = new HashQueryPlanBuilder();
|
||||
ex1.queryPlanHash(null, b1);
|
||||
ex1.queryPlanHash(b1);
|
||||
|
||||
HashQueryPlanBuilder b2 = new HashQueryPlanBuilder();
|
||||
ex2.queryPlanHash(null, b2);
|
||||
ex2.queryPlanHash(b2);
|
||||
|
||||
assertEquals(b1.build(), b2.build());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user