本文整理汇总了Java中net.sf.jsqlparser.statement.select.SetOperationList类的典型用法代码示例。如果您正苦于以下问题:Java SetOperationList类的具体用法?Java SetOperationList怎么用?Java SetOperationList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SetOperationList类属于net.sf.jsqlparser.statement.select包,在下文中一共展示了SetOperationList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addExpression
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
/**
* Adds an expression to select statements. E.g. a simple column is an
* expression.
*
* @param select
* @param expr
*/
public static void addExpression(Select select, final Expression expr) {
select.getSelectBody().accept(new SelectVisitor() {
@Override
public void visit(PlainSelect plainSelect) {
plainSelect.getSelectItems().add(new SelectExpressionItem(expr));
}
@Override
public void visit(SetOperationList setOpList) {
throw new UnsupportedOperationException(NOT_SUPPORTED_YET);
}
@Override
public void visit(WithItem withItem) {
throw new UnsupportedOperationException(NOT_SUPPORTED_YET);
}
});
}
示例2: addGroupBy
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
/**
* Adds group by to a plain select statement.
* @param select
* @param expr
*/
public static void addGroupBy(Select select, final Expression expr) {
select.getSelectBody().accept(new SelectVisitor() {
@Override
public void visit(PlainSelect plainSelect) {
plainSelect.addGroupByColumnReference(expr);
}
@Override
public void visit(SetOperationList setOpList) {
throw new UnsupportedOperationException(NOT_SUPPORTED_YET);
}
@Override
public void visit(WithItem withItem) {
throw new UnsupportedOperationException(NOT_SUPPORTED_YET);
}
});
}
示例3: processSelectBody
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
/**
* select 语句处理
*/
@Override
public void processSelectBody(SelectBody selectBody) {
if (selectBody instanceof PlainSelect) {
processPlainSelect((PlainSelect) selectBody);
} else if (selectBody instanceof WithItem) {
WithItem withItem = (WithItem) selectBody;
if (withItem.getSelectBody() != null) {
processSelectBody(withItem.getSelectBody());
}
} else {
SetOperationList operationList = (SetOperationList) selectBody;
if (operationList.getSelects() != null && operationList.getSelects().size() > 0) {
List<SelectBody> plainSelects = operationList.getSelects();
for (SelectBody plainSelect : plainSelects) {
processSelectBody(plainSelect);
}
}
}
}
示例4: visit
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
@Override
public void visit(SetOperationList list) {
for (int i = 0; i < list.getSelects().size(); i++) {
if (i != 0) {
buffer.append(' ').append(list.getOperations().get(i - 1)).append(' ');
}
boolean brackets = list.getBrackets() == null || list.getBrackets().get(i);
if (brackets) {
buffer.append("(");
}
list.getSelects().get(i).accept(this);
if (brackets) {
buffer.append(")");
}
}
if (list.getOrderByElements() != null) {
new OrderByDeParser(expressionVisitor, buffer).deParse(list.getOrderByElements());
}
if (list.getLimit() != null) {
new LimitDeparser(buffer).deParse(list.getLimit());
}
if (list.getOffset() != null) {
deparseOffset(list.getOffset());
}
if (list.getFetch() != null) {
deparseFetch(list.getFetch());
}
}
示例5: parse
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
public Set<String> parse(SelectBody selectBody) {
Set<String> tableSet = new HashSet<String>();
if (selectBody != null) {
if (selectBody instanceof PlainSelect) {
PlainSelect plainSelect = (PlainSelect) selectBody;
tableSet.addAll(parseTable(plainSelect.getFromItem()));
List<Join> joins = plainSelect.getJoins();
if (joins != null) {
for (Join join : joins) {
tableSet.addAll(parseTable(join.getRightItem()));
}
}
Expression expression = plainSelect.getWhere();
if (expression != null) {
tableSet.addAll(parseExpression(expression));
}
}
if (selectBody instanceof SetOperationList) {
SetOperationList setList = (SetOperationList) selectBody;
for (SelectBody select : setList.getSelects()) {
tableSet.addAll(parse(select));
}
}
}
return tableSet;
}
示例6: visit
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
@Override
public void visit(SetOperationList sol) {
if (sol.getOrderByElements() != null) {
for (OrderByElement ob: sol.getOrderByElements()) {
ob.accept(this);
}
}
if (sol.getSelects() != null) {
for (SelectBody ps: sol.getSelects()) {
ps.accept(this);
}
}
}
示例7: visit
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
@Override
public void visit(Select select) {
select.getSelectBody().accept(new SelectVisitor() {
@Override
public void visit(PlainSelect plainSelect) {
commandBuilder.buildSelect(plainSelect);
}
@Override
public void visit(SetOperationList setOperationList) {
}
});
}
示例8: SelectBody
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
final public SelectBody SelectBody() throws ParseException {
/* @bgen(jjtree) SelectBody */
SimpleNode jjtn000 = new SimpleNode(JJTSELECTBODY);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
SelectBody selectBody = null;
try {
if (jj_2_19(2147483647)) {
selectBody = SetOperationList();
} else {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case K_SELECT:
selectBody = PlainSelect();
break;
case 166:
jj_consume_token(166);
selectBody = PlainSelect();
((PlainSelect) selectBody).setUseBrackets(true);
jj_consume_token(167);
break;
default:
jj_la1[69] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
{
if (true)
return selectBody;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{
if (true)
throw (RuntimeException) jjte000;
}
}
if (jjte000 instanceof ParseException) {
{
if (true)
throw (ParseException) jjte000;
}
}
{
if (true)
throw (Error) jjte000;
}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
throw new Error("Missing return statement in function");
}
示例9: visit
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
@Override
public void visit(SetOperationList setOpList) {
for (SelectBody select : setOpList.getSelects()) {
select.accept(this);
}
}
示例10: visit
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
@Override
public void visit(SetOperationList list) {
for (SelectBody plainSelect : list.getSelects()) {
plainSelect.accept(this);
}
}
示例11: visit
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
@Override
public void visit(SetOperationList setOpList) {
// TODO Auto-generated method stub
}
示例12: visit
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
@Override
public void visit(SetOperationList setOpList) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
示例13: visit
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
public void visit(SetOperationList setOpList) {
}
示例14: visit
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
@Override
public void visit(SetOperationList arg0) {
isSimple = false;
}
示例15: visit
import net.sf.jsqlparser.statement.select.SetOperationList; //导入依赖的package包/类
@Override
public void visit(SetOperationList setOperationList)
{
throw new UnsupportedSqlExpressionException("SET OPERATION LIST"); //$NON-NLS-1$
}