Skip to content

Commit 31adc35

Browse files
committed
Merge pull request #85 from reed1/master
use accept() instead of toString() on StatementDeParser
2 parents a5031b4 + 674974a commit 31adc35

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/net/sf/jsqlparser/util/deparser/StatementDeParser.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ public void visit(Select select) {
111111
buffer.append("WITH ");
112112
for (Iterator<WithItem> iter = select.getWithItemsList().iterator(); iter.hasNext();) {
113113
WithItem withItem = iter.next();
114-
buffer.append(withItem);
114+
buffer.append(withItem.getName());
115+
buffer.append(" AS (");
116+
withItem.getSelectBody().accept(selectDeParser);
117+
buffer.append(")");
115118
if (iter.hasNext()) {
116119
buffer.append(",");
117120
}

0 commit comments

Comments
 (0)