|
21 | 21 | import org.junit.jupiter.api.Test;
|
22 | 22 | import org.springframework.data.relational.core.dialect.PostgresDialect;
|
23 | 23 | import org.springframework.data.relational.core.dialect.RenderContextFactory;
|
24 |
| -import org.springframework.data.relational.core.sql.AnalyticFunction; |
25 |
| -import org.springframework.data.relational.core.sql.Column; |
26 |
| -import org.springframework.data.relational.core.sql.Comparison; |
27 |
| -import org.springframework.data.relational.core.sql.Conditions; |
28 |
| -import org.springframework.data.relational.core.sql.Expressions; |
29 |
| -import org.springframework.data.relational.core.sql.Functions; |
30 |
| -import org.springframework.data.relational.core.sql.InlineQuery; |
31 |
| -import org.springframework.data.relational.core.sql.LockMode; |
32 |
| -import org.springframework.data.relational.core.sql.OrderByField; |
33 |
| -import org.springframework.data.relational.core.sql.SQL; |
34 |
| -import org.springframework.data.relational.core.sql.Select; |
35 |
| -import org.springframework.data.relational.core.sql.SqlIdentifier; |
36 |
| -import org.springframework.data.relational.core.sql.StatementBuilder; |
37 |
| -import org.springframework.data.relational.core.sql.Table; |
| 24 | +import org.springframework.data.relational.core.sql.*; |
38 | 25 | import org.springframework.util.StringUtils;
|
39 | 26 |
|
40 | 27 | /**
|
@@ -154,6 +141,21 @@ void shouldRenderOuterJoin() {
|
154 | 141 | + "LEFT OUTER JOIN department ON employee.department_id = department.id");
|
155 | 142 | }
|
156 | 143 |
|
| 144 | + @Test // GH-1421 |
| 145 | + void shouldRenderFullOuterJoin() { |
| 146 | + |
| 147 | + Table employee = SQL.table("employee"); |
| 148 | + Table department = SQL.table("department"); |
| 149 | + |
| 150 | + Select select = Select.builder().select(employee.column("id"), department.column("name")) // |
| 151 | + .from(employee) // |
| 152 | + .join(department, Join.JoinType.FULL_OUTER_JOIN).on(employee.column("department_id")).equals(department.column("id")) // |
| 153 | + .build(); |
| 154 | + |
| 155 | + assertThat(SqlRenderer.toString(select)).isEqualTo("SELECT employee.id, department.name FROM employee " |
| 156 | + + "FULL OUTER JOIN department ON employee.department_id = department.id"); |
| 157 | + } |
| 158 | + |
157 | 159 | @Test // DATAJDBC-309
|
158 | 160 | void shouldRenderSimpleJoinWithAnd() {
|
159 | 161 |
|
|
0 commit comments