当前位置: 首页>>代码示例>>Java>>正文


Java SelectVisitor类代码示例

本文整理汇总了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);
		}
	});
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:27,代码来源:SelectUtils.java

示例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);
	}
});
  }
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:25,代码来源:SelectUtils.java

示例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) {
        }
    });
}
 
开发者ID:mulesoft-labs,项目名称:mongo-sql-console,代码行数:14,代码来源:SQLStatementVisitor.java

示例4: getSelectVisitor

import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public SelectVisitor getSelectVisitor() {
    return selectVisitor;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:4,代码来源:ExpressionVisitorAdapter.java

示例5: setSelectVisitor

import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public void setSelectVisitor(SelectVisitor selectVisitor) {
    this.selectVisitor = selectVisitor;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:4,代码来源:ExpressionVisitorAdapter.java

示例6: getSelectVisitor

import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public SelectVisitor getSelectVisitor() {
	return selectVisitor;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:4,代码来源:ReplaceDeParser.java

示例7: setSelectVisitor

import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public void setSelectVisitor(SelectVisitor visitor) {
	selectVisitor = visitor;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:4,代码来源:ReplaceDeParser.java

示例8: setSelectVisitor

import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public void setSelectVisitor(SelectVisitor visitor) {
    selectVisitor = visitor;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:4,代码来源:InsertDeParser.java

示例9: CreateViewDeParser

import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public CreateViewDeParser(StringBuilder buffer, SelectVisitor selectVisitor) {
	this.buffer = buffer;
       this.selectVisitor = selectVisitor;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:5,代码来源:CreateViewDeParser.java

示例10: AlterViewDeParser

import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public AlterViewDeParser(StringBuilder buffer, SelectVisitor selectVisitor) {
	this.buffer = buffer;
       this.selectVisitor = selectVisitor;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:5,代码来源:AlterViewDeParser.java

示例11: PreparedExpressionConverter

import net.sf.jsqlparser.statement.select.SelectVisitor; //导入依赖的package包/类
public PreparedExpressionConverter(SelectVisitor selectVisitor, StringBuilder buffer, ConverterContext context) {
    super(selectVisitor, buffer);
    this.context = context;
}
 
开发者ID:RapturePlatform,项目名称:Rapture,代码行数:5,代码来源:PreparedExpressionConverter.java

示例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;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:16,代码来源:UpdateDeParser.java

示例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;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:16,代码来源:ReplaceDeParser.java

示例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;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:17,代码来源:InsertDeParser.java

示例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;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:20,代码来源:ExpressionDeParser.java


注:本文中的net.sf.jsqlparser.statement.select.SelectVisitor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。