本文整理汇总了Java中net.sf.jsqlparser.statement.select.SelectVisitor类的典型用法代码示例。如果您正苦于以下问题:Java SelectVisitor类的具体用法?Java SelectVisitor怎么用?Java SelectVisitor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SelectVisitor类属于net.sf.jsqlparser.statement.select包,在下文中一共展示了SelectVisitor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addExpression
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的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.SelectVisitor; //导入依赖的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: visit
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的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) {
}
});
}
示例4: getSelectVisitor
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public SelectVisitor getSelectVisitor() {
return selectVisitor;
}
示例5: setSelectVisitor
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public void setSelectVisitor(SelectVisitor selectVisitor) {
this.selectVisitor = selectVisitor;
}
示例6: getSelectVisitor
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public SelectVisitor getSelectVisitor() {
return selectVisitor;
}
示例7: setSelectVisitor
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public void setSelectVisitor(SelectVisitor visitor) {
selectVisitor = visitor;
}
示例8: setSelectVisitor
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public void setSelectVisitor(SelectVisitor visitor) {
selectVisitor = visitor;
}
示例9: CreateViewDeParser
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public CreateViewDeParser(StringBuilder buffer, SelectVisitor selectVisitor) {
this.buffer = buffer;
this.selectVisitor = selectVisitor;
}
示例10: AlterViewDeParser
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public AlterViewDeParser(StringBuilder buffer, SelectVisitor selectVisitor) {
this.buffer = buffer;
this.selectVisitor = selectVisitor;
}
示例11: PreparedExpressionConverter
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public PreparedExpressionConverter(SelectVisitor selectVisitor, StringBuilder buffer, ConverterContext context) {
super(selectVisitor, buffer);
this.context = context;
}
示例12: UpdateDeParser
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
/**
* @param expressionVisitor a {@link ExpressionVisitor} to de-parse
* expressions. It has to share the same<br>
* StringBuilder (buffer parameter) as this object in order to work
* @param selectVisitor a {@link SelectVisitor} to de-parse
* {@link net.sf.jsqlparser.statement.select.Select}s. It has to share the
* same<br>
* StringBuilder (buffer parameter) as this object in order to work
* @param buffer the buffer that will be filled with the select
*/
public UpdateDeParser(ExpressionVisitor expressionVisitor, SelectVisitor selectVisitor, StringBuilder buffer) {
this.buffer = buffer;
this.expressionVisitor = expressionVisitor;
this.selectVisitor = selectVisitor;
}
示例13: ReplaceDeParser
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
/**
* @param expressionVisitor a {@link ExpressionVisitor} to de-parse
* expressions. It has to share the same<br>
* StringBuilder (buffer parameter) as this object in order to work
* @param selectVisitor a {@link SelectVisitor} to de-parse
* {@link net.sf.jsqlparser.statement.select.Select}s. It has to share the
* same<br>
* StringBuilder (buffer parameter) as this object in order to work
* @param buffer the buffer that will be filled with the select
*/
public ReplaceDeParser(ExpressionVisitor expressionVisitor, SelectVisitor selectVisitor, StringBuilder buffer) {
this.buffer = buffer;
this.expressionVisitor = expressionVisitor;
this.selectVisitor = selectVisitor;
}
示例14: InsertDeParser
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
/**
* @param expressionVisitor a {@link ExpressionVisitor} to de-parse
* {@link net.sf.jsqlparser.expression.Expression}s. It has to share the
* same<br>
* StringBuilder (buffer parameter) as this object in order to work
* @param selectVisitor a {@link SelectVisitor} to de-parse
* {@link net.sf.jsqlparser.statement.select.Select}s. It has to share the
* same<br>
* StringBuilder (buffer parameter) as this object in order to work
* @param buffer the buffer that will be filled with the insert
*/
public InsertDeParser(ExpressionVisitor expressionVisitor, SelectVisitor selectVisitor, StringBuilder buffer) {
this.buffer = buffer;
this.expressionVisitor = expressionVisitor;
this.selectVisitor = selectVisitor;
}
示例15: ExpressionDeParser
import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
/**
* @param selectVisitor a SelectVisitor to de-parse SubSelects. It has to
* share the same<br> StringBuilder as this object in order to work, as:
*
* <pre>
* <code>
* StringBuilder myBuf = new StringBuilder();
* MySelectDeparser selectDeparser = new MySelectDeparser();
* selectDeparser.setBuffer(myBuf);
* ExpressionDeParser expressionDeParser = new ExpressionDeParser(selectDeparser, myBuf);
* </code>
* </pre>
*
* @param buffer the buffer that will be filled with the expression
*/
public ExpressionDeParser(SelectVisitor selectVisitor, StringBuilder buffer) {
this.selectVisitor = selectVisitor;
this.buffer = buffer;
}