org.onetwo.common.db.parser.BetweenOperatorParser Maven / Gradle / Ivy
The newest version!
package org.onetwo.common.db.parser;
import org.onetwo.common.lexer.AbstractParser.JTokenValueCollection;
public class BetweenOperatorParser implements OperatorParser {
@Override
public SqlTokenKey getOperator() {
return SqlTokenKey.BETWEEN;
}
@Override
public SqlObject parse(JFishSqlParser parser, JTokenValueCollection fieldTokens, JTokenValueCollection startTokens) {
System.out.println("left: " + startTokens);
parser.nextTokenIs(SqlTokenKey.AND);
JTokenValueCollection endTokens = parser.nextAllTokensUntilKeywords();
BetweenVarConditionExpr between = new BetweenVarConditionExpr(fieldTokens.clone(), startTokens.clone(), endTokens.clone());
return between;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy