mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#2065 - Fix missed tests for - Refactor SQL generation - remove excess whitespace
This commit is contained in:
+2
-2
@@ -122,7 +122,7 @@ public class IsEmptyExpressionQueryTest extends BaseTestCase {
|
||||
|
||||
query.findList();
|
||||
if (isPostgres()) {
|
||||
assertThat(sqlOf(query)).contains("select distinct on (t0.id) t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where not exists (select 1 from contact_note x where x.contact_id = u1.id)");
|
||||
assertThat(sqlOf(query)).contains("select distinct on (t0.id) t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where not exists (select 1 from contact_note x where x.contact_id = u1.id)");
|
||||
|
||||
} else {
|
||||
assertThat(sqlOf(query)).contains("select distinct t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where not exists (select 1 from contact_note x where x.contact_id = u1.id)");
|
||||
@@ -141,7 +141,7 @@ public class IsEmptyExpressionQueryTest extends BaseTestCase {
|
||||
|
||||
query.findList();
|
||||
if (isPostgres()) {
|
||||
assertThat(sqlOf(query)).contains("select distinct on (t0.id) t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where exists (select 1 from contact_note x where x.contact_id = u1.id)");
|
||||
assertThat(sqlOf(query)).contains("select distinct on (t0.id) t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where exists (select 1 from contact_note x where x.contact_id = u1.id)");
|
||||
|
||||
} else {
|
||||
assertThat(sqlOf(query)).contains("select distinct t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where exists (select 1 from contact_note x where x.contact_id = u1.id)");
|
||||
|
||||
@@ -24,7 +24,7 @@ public class TestImplicitJoinOnParentRelationship extends BaseTestCase {
|
||||
query.findList();
|
||||
|
||||
if (isPostgres()) {
|
||||
String expectedSql = "select distinct on (t0.id) t0.id, t0.name from o_customer t0 join o_order u1 on u1.kcustomer_id = t0.id join o_order_detail u2 on u2.order_id = u1.id join o_product u3 on u3.id = u2.product_id where u3.name = ?";
|
||||
String expectedSql = "select distinct on (t0.id) t0.id, t0.name from o_customer t0 join o_order u1 on u1.kcustomer_id = t0.id join o_order_detail u2 on u2.order_id = u1.id join o_product u3 on u3.id = u2.product_id where u3.name = ?";
|
||||
assertThat(sqlOf(query, 1)).contains(expectedSql);
|
||||
|
||||
} else {
|
||||
@@ -55,7 +55,7 @@ public class TestImplicitJoinOnParentRelationship extends BaseTestCase {
|
||||
query.findList();
|
||||
|
||||
if (isPostgres()) {
|
||||
String expectedSql = "select distinct on (t0.id) t0.id, t0.name from o_customer t0 left join o_order u1 on u1.kcustomer_id = t0.id left join o_order_detail u2 on u2.order_id = u1.id left join o_product u3 on u3.id = u2.product_id where (u3.name = ? or t0.id = ?)";
|
||||
String expectedSql = "select distinct on (t0.id) t0.id, t0.name from o_customer t0 left join o_order u1 on u1.kcustomer_id = t0.id left join o_order_detail u2 on u2.order_id = u1.id left join o_product u3 on u3.id = u2.product_id where (u3.name = ? or t0.id = ?)";
|
||||
assertThat(sqlOf(query, 1)).contains(expectedSql);
|
||||
} else {
|
||||
String expectedSql = "select distinct t0.id, t0.name from o_customer t0 left join o_order u1 on u1.kcustomer_id = t0.id left join o_order_detail u2 on u2.order_id = u1.id left join o_product u3 on u3.id = u2.product_id where (u3.name = ? or t0.id = ?)";
|
||||
@@ -76,7 +76,7 @@ public class TestImplicitJoinOnParentRelationship extends BaseTestCase {
|
||||
query.findList();
|
||||
|
||||
if (isPostgres()) {
|
||||
String expectedSql = "select distinct on (t0.id) t0.id, t0.name from o_customer t0 left join o_order u1 on u1.kcustomer_id = t0.id left join o_order_detail u2 on u2.order_id = u1.id left join o_product u3 on u3.id = u2.product_id where (u3.name = ? or t0.id = ?)";
|
||||
String expectedSql = "select distinct on (t0.id) t0.id, t0.name from o_customer t0 left join o_order u1 on u1.kcustomer_id = t0.id left join o_order_detail u2 on u2.order_id = u1.id left join o_product u3 on u3.id = u2.product_id where (u3.name = ? or t0.id = ?)";
|
||||
assertThat(sqlOf(query, 1)).contains(expectedSql);
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user