net.sf.jsqlparser.expression.operators.relational.Between Java Examples

The following examples show how to use net.sf.jsqlparser.expression.operators.relational.Between. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BetweenAndExpressionConverter.java    From sqlhelper with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public Between toJSqlParserExpression(BetweenAndExpression expression) {
    Between between = new Between();
    between.setLeftExpression(ExpressionConverters.toJSqlParserExpression(expression.getTarget()));
    between.setNot(expression.not());
    between.setBetweenExpressionStart(ExpressionConverters.toJSqlParserExpression(expression.getLow()));
    between.setBetweenExpressionEnd(ExpressionConverters.toJSqlParserExpression(expression.getHigh()));
    return between;
}
 
Example #2
Source File: CTEToNestedQueryConverter.java    From quetzal with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void visit(Between between) {
	clear();
	boolean prevIsTopVal = isTopLevel;
	boolean tmpLeftTableFound = false;
	boolean tmpRightTableFound = false;
	boolean tmpWhereOnlyExpFound = false;
	isTopLevel = false;
	between.getLeftExpression().accept(this);
	// update tmp
	tmpLeftTableFound |= leftTableFound;
	tmpRightTableFound |= rightTableFound;
	tmpWhereOnlyExpFound |= whereOnlyExpFound;
	//
	between.getBetweenExpressionStart().accept(this);
	// update tmp
	tmpLeftTableFound |= leftTableFound;
	tmpRightTableFound |= rightTableFound;
	tmpWhereOnlyExpFound |= whereOnlyExpFound;
	//
	clear();
	between.getBetweenExpressionStart().accept(this);
	// update tmp
	tmpLeftTableFound |= leftTableFound;
	tmpRightTableFound |= rightTableFound;
	tmpWhereOnlyExpFound |= whereOnlyExpFound;
	//			
	// update 
	leftTableFound = tmpLeftTableFound;
	rightTableFound = tmpRightTableFound;
	whereOnlyExpFound = tmpWhereOnlyExpFound;
	//
	isTopLevel = prevIsTopVal;
	if (leftTableFound && rightTableFound) {
		whereOnlyExpFound = true;
	}
	defaultTopLevelProcessing(between);
	
}
 
Example #3
Source File: BetweenAndExpressionConverter.java    From sqlhelper with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public BetweenAndExpression fromJSqlParserExpression(Between expression) {
    return null;
}
 
Example #4
Source File: BetweenAndExpressionConverter.java    From sqlhelper with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public Class<Between> getJSqlParserExpressionClass() {
    return Between.class;
}
 
Example #5
Source File: ExpressionVisitorImpl.java    From DataPermissionHelper with Apache License 2.0 4 votes vote down vote up
@Override
public void visit(Between between) {
    between.getLeftExpression().accept(new ExpressionVisitorImpl());
    between.getBetweenExpressionStart().accept(new ExpressionVisitorImpl());
    between.getBetweenExpressionEnd().accept(new ExpressionVisitorImpl());
}
 
Example #6
Source File: DMLWhereClauseVisitorAdapter.java    From spanner-jdbc with MIT License 4 votes vote down vote up
@Override
public void visit(Between expr) {
  invalid = true;
  super.visit(expr);
}