|
9 | 9 | */ |
10 | 10 | package net.sf.jsqlparser.util.deparser; |
11 | 11 |
|
| 12 | +import java.util.Iterator; |
| 13 | +import java.util.List; |
12 | 14 | import net.sf.jsqlparser.expression.*; |
13 | 15 | import net.sf.jsqlparser.schema.*; |
14 | 16 | import net.sf.jsqlparser.statement.select.*; |
15 | 17 | import net.sf.jsqlparser.statement.values.ValuesStatement; |
16 | 18 |
|
17 | | -import java.util.Iterator; |
18 | | -import java.util.List; |
19 | | - |
20 | 19 | public class SelectDeParser implements SelectVisitor, SelectItemVisitor, FromItemVisitor, PivotVisitor { |
21 | 20 |
|
22 | 21 | protected StringBuilder buffer = new StringBuilder(); |
@@ -168,6 +167,9 @@ public void visit(PlainSelect plainSelect) { |
168 | 167 | if (plainSelect.getOptimizeFor() != null) { |
169 | 168 | deparseOptimizeFor(plainSelect.getOptimizeFor()); |
170 | 169 | } |
| 170 | + if (plainSelect.getForXmlPath() != null) { |
| 171 | + buffer.append(" FOR XML PATH(" + plainSelect.getForXmlPath() + ")"); |
| 172 | + } |
171 | 173 | if (plainSelect.isUseBrackets()) { |
172 | 174 | buffer.append(")"); |
173 | 175 | } |
@@ -328,11 +330,11 @@ public void visit(SubJoin subjoin) { |
328 | 330 | } |
329 | 331 |
|
330 | 332 | public void deparseJoin(Join join) { |
331 | | - if (join.isSimple() && join.isOuter()) { |
332 | | - buffer.append(", OUTER "); |
333 | | - } else if (join.isSimple()) { |
334 | | - buffer.append(", "); |
335 | | - } else { |
| 333 | + if (join.isSimple() && join.isOuter()) { |
| 334 | + buffer.append(", OUTER "); |
| 335 | + } else if (join.isSimple()) { |
| 336 | + buffer.append(", "); |
| 337 | + } else { |
336 | 338 |
|
337 | 339 | if (join.isRight()) { |
338 | 340 | buffer.append(" RIGHT"); |
|
0 commit comments