Skip to content

Commit 674974a

Browse files
committed
use accept() instead of toString() on StatementDeParser
1 parent a5031b4 commit 674974a

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)