本文整理汇总了Java中net.sf.jsqlparser.statement.select.Select.getWithItemsList方法的典型用法代码示例。如果您正苦于以下问题:Java Select.getWithItemsList方法的具体用法?Java Select.getWithItemsList怎么用?Java Select.getWithItemsList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jsqlparser.statement.select.Select
的用法示例。
在下文中一共展示了Select.getWithItemsList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import net.sf.jsqlparser.statement.select.Select; //导入方法依赖的package包/类
@Override
public void visit(Select select) {
SelectDeParser selectDeParser = new SelectDeParser();
selectDeParser.setBuffer(buffer);
ExpressionDeParser expressionDeParser = new ExpressionDeParser(selectDeParser, buffer);
selectDeParser.setExpressionVisitor(expressionDeParser);
if (select.getWithItemsList() != null && !select.getWithItemsList().isEmpty()) {
buffer.append("WITH ");
for (Iterator<WithItem> iter = select.getWithItemsList().iterator(); iter.hasNext();) {
WithItem withItem = iter.next();
withItem.accept(selectDeParser);
if (iter.hasNext()) {
buffer.append(",");
}
buffer.append(" ");
}
}
select.getSelectBody().accept(selectDeParser);
}
示例2: visit
import net.sf.jsqlparser.statement.select.Select; //导入方法依赖的package包/类
public void visit(Select select) {
SelectDeParser selectDeParser = new SelectDeParser();
selectDeParser.setBuffer(buffer);
ExpressionDeParser expressionDeParser = new ExpressionDeParser(selectDeParser, buffer);
selectDeParser.setExpressionVisitor(expressionDeParser);
if (select.getWithItemsList() != null && !select.getWithItemsList().isEmpty()) {
buffer.append(select.getCommentWith() != null ? select.getCommentWith()+" " : "").append(ExpressionDeParser.LINE_SEPARATOR).append("With ");
for (int i = 0; i < select.getWithItemsList().size(); i++) {
WithItem withItem = (WithItem) select.getWithItemsList().get(i);
buffer.append(withItem);
buffer.append((i < select.getWithItemsList().size() - 1) ? (!"".equals(select.getCommentsComma().get(i)) ? " " + select.getCommentsComma().get(i)+ExpressionDeParser.LINE_SEPARATOR:"")+ "," : "")
.append(ExpressionDeParser.LINE_SEPARATOR).append(" ");
}
}
select.getSelectBody().accept(selectDeParser);
buffer.append(!"".equals(select.getEndComment()) ? " "+select.getEndComment() : "");
}
示例3: visit
import net.sf.jsqlparser.statement.select.Select; //导入方法依赖的package包/类
@Override
public void visit(Select select) {
if (select.getWithItemsList() != null) {
for (WithItem withItem : select.getWithItemsList()) {
withItem.accept(this);
}
}
select.getSelectBody().accept(this);
}
示例4: visit
import net.sf.jsqlparser.statement.select.Select; //导入方法依赖的package包/类
@Override
public void visit(Select select) {
if (select.getSelectBody() != null) {
select.getSelectBody().accept(this);
}
if (select.getWithItemsList() != null) {
select.getWithItemsList().forEach(
i -> {
if (i != null) {
i.accept(this);
}
}
);
}
}