mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#919 - io.ebean package initial
This commit is contained in:
1 parent
5821dc96b9
commit
971e2dc91b
2134 files changed
+10721
-8652
No files matched your search
@@ -0,0 +1,404 @@
|
||||
package io.ebeaninternal.server.grammer;
|
||||
|
||||
import io.ebean.Expression;
|
||||
import io.ebean.ExpressionList;
|
||||
import io.ebean.FetchConfig;
|
||||
import io.ebean.LikeType;
|
||||
import io.ebean.OrderBy;
|
||||
import io.ebeaninternal.api.SpiQuery;
|
||||
import io.ebeaninternal.server.grammer.antlr.EQLBaseListener;
|
||||
import io.ebeaninternal.server.grammer.antlr.EQLLexer;
|
||||
import io.ebeaninternal.server.grammer.antlr.EQLParser;
|
||||
import io.ebeaninternal.server.util.ArrayStack;
|
||||
import org.antlr.v4.runtime.ParserRuleContext;
|
||||
import org.antlr.v4.runtime.tree.ParseTree;
|
||||
import org.antlr.v4.runtime.tree.TerminalNode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
class EqlAdapter<T> extends EQLBaseListener {
|
||||
|
||||
private static final OperatorMapping operatorMapping = new OperatorMapping();
|
||||
|
||||
private static final String DISTINCT = "distinct";
|
||||
|
||||
private static final String NULLS = "nulls";
|
||||
|
||||
private static final String ASC = "asc";
|
||||
|
||||
private final SpiQuery<T> query;
|
||||
|
||||
private final EqlAdapterHelper helper;
|
||||
|
||||
private ArrayStack<ExpressionList<T>> textStack;
|
||||
|
||||
private ArrayStack<ExpressionList<T>> whereStack;
|
||||
|
||||
private boolean textMode;
|
||||
|
||||
private List<Object> inValues;
|
||||
|
||||
private String inPropertyName;
|
||||
|
||||
public EqlAdapter(SpiQuery<T> query) {
|
||||
this.query = query;
|
||||
this.helper = new EqlAdapterHelper(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current expression list that expressions should be added to.
|
||||
*/
|
||||
protected ExpressionList<T> peekExprList() {
|
||||
|
||||
if (textMode) {
|
||||
// return the current text expression list
|
||||
return _peekText();
|
||||
}
|
||||
|
||||
if (whereStack == null) {
|
||||
whereStack = new ArrayStack<>();
|
||||
whereStack.push(query.where());
|
||||
}
|
||||
// return the current expression list
|
||||
return whereStack.peek();
|
||||
}
|
||||
|
||||
private ExpressionList<T> _peekText() {
|
||||
if (textStack == null) {
|
||||
textStack = new ArrayStack<>();
|
||||
// empty so push on the queries base expression list
|
||||
textStack.push(query.text());
|
||||
}
|
||||
// return the current expression list
|
||||
return textStack.peek();
|
||||
}
|
||||
|
||||
/**
|
||||
* Push the expression list onto the appropriate stack.
|
||||
*/
|
||||
private void pushExprList(ExpressionList<T> list) {
|
||||
if (textMode) {
|
||||
textStack.push(list);
|
||||
} else {
|
||||
whereStack.push(list);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* End a list of expressions added by 'OR'.
|
||||
*/
|
||||
private void popJunction() {
|
||||
if (textMode) {
|
||||
textStack.pop();
|
||||
} else {
|
||||
whereStack.pop();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterSelect_clause(EQLParser.Select_clauseContext ctx) {
|
||||
|
||||
checkChildren(ctx, 4);
|
||||
if (DISTINCT.equals(child(ctx, 1))) {
|
||||
query.setDistinct(true);
|
||||
query.select(child(ctx, 3));
|
||||
} else {
|
||||
query.select(child(ctx, 2));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterFetch_path(EQLParser.Fetch_pathContext ctx) {
|
||||
|
||||
int childCount = ctx.getChildCount();
|
||||
checkChildren(ctx, 2);
|
||||
String path = child(ctx, 1);
|
||||
|
||||
int noPropertiesLength = 2;
|
||||
|
||||
FetchConfig fetchConfig = ParseFetchConfig.parse(path);
|
||||
if (fetchConfig != null) {
|
||||
noPropertiesLength = 3;
|
||||
path = child(ctx, 2);
|
||||
}
|
||||
if (childCount == noPropertiesLength) {
|
||||
query.fetch(path, fetchConfig);
|
||||
|
||||
} else {
|
||||
String fetchProperties = trimParenthesis(ctx.getChild(noPropertiesLength).getText());
|
||||
query.fetch(path, fetchProperties, fetchConfig);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterOrderby_property(EQLParser.Orderby_propertyContext ctx) {
|
||||
|
||||
int childCount = ctx.getChildCount();
|
||||
|
||||
String path = child(ctx, 0);
|
||||
boolean asc = true;
|
||||
String nulls = null;
|
||||
String nullsFirstLast = null;
|
||||
|
||||
if (childCount == 3) {
|
||||
asc = child(ctx, 1).startsWith(ASC);
|
||||
nullsFirstLast = ctx.getChild(2).getChild(1).getText();
|
||||
nulls = NULLS;
|
||||
|
||||
} else if (childCount == 2) {
|
||||
String firstChild = child(ctx, 1);
|
||||
if (firstChild.startsWith(NULLS)) {
|
||||
nullsFirstLast = ctx.getChild(1).getChild(1).getText();
|
||||
nulls = NULLS;
|
||||
} else {
|
||||
asc = firstChild.startsWith(ASC);
|
||||
}
|
||||
}
|
||||
|
||||
query.orderBy().add(new OrderBy.Property(path, asc, nulls, nullsFirstLast));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterLimit_clause(EQLParser.Limit_clauseContext ctx) {
|
||||
|
||||
try {
|
||||
String limitValue = child(ctx, 1);
|
||||
query.setMaxRows(Integer.parseInt(limitValue));
|
||||
|
||||
int childCount = ctx.getChildCount();
|
||||
if (childCount == 3) {
|
||||
ParseTree offsetTree = ctx.getChild(2);
|
||||
String offsetValue = offsetTree.getChild(1).getText();
|
||||
query.setFirstRow(Integer.parseInt(offsetValue));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
throw new IllegalArgumentException("Error parsing limit or offset parameter - not an integer", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Trim leading '(' and trailing ')'
|
||||
*/
|
||||
private String trimParenthesis(String text) {
|
||||
text = text.substring(1);
|
||||
text = text.substring(0, text.length() - 1);
|
||||
return text;
|
||||
}
|
||||
|
||||
private String getLeftHandSidePath(ParserRuleContext ctx) {
|
||||
TerminalNode pathToken = ctx.getToken(EQLLexer.PATH_VARIABLE, 0);
|
||||
return pathToken.getText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterBetween_expression(EQLParser.Between_expressionContext ctx) {
|
||||
|
||||
checkChildren(ctx, 5);
|
||||
String path = getLeftHandSidePath(ctx);
|
||||
EqlOperator op = getOperator(ctx);
|
||||
if (op != EqlOperator.BETWEEN) {
|
||||
throw new IllegalStateException("Expecting BETWEEN operator but got " + op);
|
||||
}
|
||||
helper.addBetween(path, child(ctx, 2), child(ctx, 4));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterPropertyBetween_expression(EQLParser.PropertyBetween_expressionContext ctx) {
|
||||
checkChildren(ctx, 5);
|
||||
String rawValue = child(ctx, 0);
|
||||
EqlOperator op = getOperator(ctx);
|
||||
if (op != EqlOperator.BETWEEN) {
|
||||
throw new IllegalStateException("Expecting BETWEEN operator but got " + op);
|
||||
}
|
||||
helper.addBetweenProperty(rawValue, child(ctx, 2), child(ctx, 4));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterIn_expression(EQLParser.In_expressionContext ctx) {
|
||||
this.inValues = new ArrayList<>();
|
||||
this.inPropertyName = getLeftHandSidePath(ctx);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterIn_value(EQLParser.In_valueContext ctx) {
|
||||
int childCount = ctx.getChildCount();
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
String text = child(ctx, i);
|
||||
if (isValue(text)) {
|
||||
inValues.add(helper.bind(text));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String child(ParserRuleContext ctx, int position) {
|
||||
ParseTree child = ctx.getChild(position);
|
||||
return child.getText();
|
||||
}
|
||||
|
||||
private boolean isValue(String text) {
|
||||
if (text.length() == 1 && (text.equals("(") || text.equals(")") || text.equals(","))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exitIn_expression(EQLParser.In_expressionContext ctx) {
|
||||
helper.addIn(inPropertyName, inValues);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterIsNull_expression(EQLParser.IsNull_expressionContext ctx) {
|
||||
String path = getLeftHandSidePath(ctx);
|
||||
peekExprList().isNull(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterIsNotNull_expression(EQLParser.IsNotNull_expressionContext ctx) {
|
||||
String path = getLeftHandSidePath(ctx);
|
||||
peekExprList().isNotNull(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterIsEmpty_expression(EQLParser.IsEmpty_expressionContext ctx) {
|
||||
String path = getLeftHandSidePath(ctx);
|
||||
peekExprList().isEmpty(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterIsNotEmpty_expression(EQLParser.IsNotEmpty_expressionContext ctx) {
|
||||
String path = getLeftHandSidePath(ctx);
|
||||
peekExprList().isNotEmpty(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterLike_expression(EQLParser.Like_expressionContext ctx) {
|
||||
addExpression(ctx);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterComparison_expression(EQLParser.Comparison_expressionContext ctx) {
|
||||
addExpression(ctx);
|
||||
}
|
||||
|
||||
private void addExpression(ParserRuleContext ctx) {
|
||||
int childCount = ctx.getChildCount();
|
||||
if (childCount < 3) {
|
||||
throw new IllegalStateException("expecting 3 children for comparison? " + ctx);
|
||||
}
|
||||
String operator = child(ctx, 1);
|
||||
EqlOperator op = operatorMapping.get(operator);
|
||||
if (op == null) {
|
||||
throw new IllegalStateException("No operator found for " + operator);
|
||||
}
|
||||
String path = getLeftHandSidePath(ctx);
|
||||
String rhs = child(ctx, 2);
|
||||
if (path.equals(rhs)) {
|
||||
// the 'value operator path' form
|
||||
// invert the operator and use LHS as RHS
|
||||
op = invert(op);
|
||||
rhs = child(ctx, 0);
|
||||
}
|
||||
|
||||
// RHS is Path, Literal or Named input parameter
|
||||
helper.addExpression(path, op, rhs);
|
||||
}
|
||||
|
||||
private EqlOperator invert(EqlOperator op) {
|
||||
switch (op) {
|
||||
// no change
|
||||
case EQ:
|
||||
return EqlOperator.EQ;
|
||||
case IEQ:
|
||||
return EqlOperator.IEQ;
|
||||
case NE:
|
||||
return EqlOperator.NE;
|
||||
// invert
|
||||
case LT:
|
||||
return EqlOperator.GT;
|
||||
case LTE:
|
||||
return EqlOperator.GTE;
|
||||
case GT:
|
||||
return EqlOperator.LT;
|
||||
case GTE:
|
||||
return EqlOperator.LTE;
|
||||
default:
|
||||
throw new IllegalStateException("Can not invert operator " + op);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void enterConditional_term(EQLParser.Conditional_termContext ctx) {
|
||||
int childCount = ctx.getChildCount();
|
||||
if (childCount > 1) {
|
||||
pushExprList(peekExprList().and());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exitConditional_term(EQLParser.Conditional_termContext ctx) {
|
||||
if (ctx.getChildCount() > 1) {
|
||||
popJunction();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterConditional_expression(EQLParser.Conditional_expressionContext ctx) {
|
||||
if (ctx.getChildCount() > 1) {
|
||||
pushExprList(peekExprList().or());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exitConditional_expression(EQLParser.Conditional_expressionContext ctx) {
|
||||
if (ctx.getChildCount() > 1) {
|
||||
popJunction();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enterConditional_factor(EQLParser.Conditional_factorContext ctx) {
|
||||
if (ctx.getChildCount() > 1) {
|
||||
pushExprList(peekExprList().not());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exitConditional_factor(EQLParser.Conditional_factorContext ctx) {
|
||||
if (ctx.getChildCount() > 1) {
|
||||
popJunction();
|
||||
}
|
||||
}
|
||||
|
||||
private EqlOperator getOperator(ParserRuleContext ctx) {
|
||||
String operator = child(ctx, 1);
|
||||
EqlOperator op = operatorMapping.get(operator);
|
||||
if (op == null) {
|
||||
throw new IllegalStateException("No operator found for " + operator);
|
||||
}
|
||||
return op;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for the minimum number of children.
|
||||
*/
|
||||
private void checkChildren(ParserRuleContext ctx, int min) {
|
||||
if (ctx.getChildCount() < min) {
|
||||
throw new IllegalStateException("expecting " + min + " children for comparison? " + ctx);
|
||||
}
|
||||
}
|
||||
|
||||
public Object namedParam(String parameterName) {
|
||||
return query.createNamedParameter(parameterName);
|
||||
}
|
||||
|
||||
public Expression like(boolean caseInsensitive, LikeType likeType, String property, Object bindValue) {
|
||||
return query.getExpressionFactory().like(property, bindValue, caseInsensitive, likeType);
|
||||
}
|
||||
|
||||
public Expression ieq(String property, Object bindValue) {
|
||||
return query.getExpressionFactory().ieqObject(property, bindValue);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
package io.ebeaninternal.server.grammer;
|
||||
|
||||
import io.ebean.ExpressionList;
|
||||
import io.ebean.LikeType;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
class EqlAdapterHelper {
|
||||
|
||||
private final EqlAdapter<?> owner;
|
||||
|
||||
public EqlAdapterHelper(EqlAdapter<?> owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
enum ValueType {
|
||||
NAMED_PARAM,
|
||||
STRING,
|
||||
BOOL,
|
||||
NUMBER
|
||||
}
|
||||
|
||||
private ValueType getValueType(String valueAsText) {
|
||||
|
||||
char firstChar = Character.toLowerCase(valueAsText.charAt(0));
|
||||
switch (firstChar) {
|
||||
case ':':
|
||||
return ValueType.NAMED_PARAM;
|
||||
case 't':
|
||||
return ValueType.BOOL;
|
||||
case 'f':
|
||||
return ValueType.BOOL;
|
||||
case '\'':
|
||||
return ValueType.STRING;
|
||||
default:
|
||||
if (Character.isDigit(firstChar)) {
|
||||
return ValueType.NUMBER;
|
||||
}
|
||||
throw new IllegalArgumentException("Unexpected first character in value [" + valueAsText + "]");
|
||||
}
|
||||
}
|
||||
|
||||
protected void addBetweenProperty(String rawValue, String lowProperty, String highProperty) {
|
||||
peekExprList().betweenProperties(lowProperty, highProperty, bind(rawValue));
|
||||
}
|
||||
|
||||
protected void addBetween(String path, String value1, String value2) {
|
||||
peekExprList().between(path, bind(value1), bind(value2));
|
||||
}
|
||||
|
||||
protected void addIn(String path, List<Object> inValues) {
|
||||
peekExprList().in(path, inValues);
|
||||
}
|
||||
|
||||
protected void addExpression(String path, EqlOperator op, String value) {
|
||||
|
||||
switch (op) {
|
||||
case EQ:
|
||||
peekExprList().eq(path, bind(value));
|
||||
break;
|
||||
case IEQ:
|
||||
peekExprList().add(owner.ieq(path, bind(value)));
|
||||
break;
|
||||
case NE:
|
||||
peekExprList().ne(path, bind(value));
|
||||
break;
|
||||
case GT:
|
||||
peekExprList().gt(path, bind(value));
|
||||
break;
|
||||
case LT:
|
||||
peekExprList().lt(path, bind(value));
|
||||
break;
|
||||
case GTE:
|
||||
peekExprList().ge(path, bind(value));
|
||||
break;
|
||||
case LTE:
|
||||
peekExprList().le(path, bind(value));
|
||||
break;
|
||||
case LIKE:
|
||||
addLike(false, LikeType.RAW, path, bind(value));
|
||||
break;
|
||||
case CONTAINS:
|
||||
addLike(false, LikeType.CONTAINS, path, bind(value));
|
||||
break;
|
||||
case STARTS_WITH:
|
||||
addLike(false, LikeType.STARTS_WITH, path, bind(value));
|
||||
break;
|
||||
case ENDS_WITH:
|
||||
addLike(false, LikeType.ENDS_WITH, path, bind(value));
|
||||
break;
|
||||
case ILIKE:
|
||||
addLike(true, LikeType.RAW, path, bind(value));
|
||||
break;
|
||||
case ICONTAINS:
|
||||
addLike(true, LikeType.CONTAINS, path, bind(value));
|
||||
break;
|
||||
case ISTARTS_WITH:
|
||||
addLike(true, LikeType.STARTS_WITH, path, bind(value));
|
||||
break;
|
||||
case IENDS_WITH:
|
||||
addLike(true, LikeType.ENDS_WITH, path, bind(value));
|
||||
break;
|
||||
default:
|
||||
throw new IllegalStateException("Unhandled operator " + op);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void addLike(boolean caseInsensitive, LikeType likeType, String path, Object bindValue) {
|
||||
peekExprList().add(owner.like(caseInsensitive, likeType, path, bindValue));
|
||||
}
|
||||
|
||||
protected Object bind(String value) {
|
||||
ValueType valueType = getValueType(value);
|
||||
return getBindValue(valueType, value);
|
||||
}
|
||||
|
||||
private ExpressionList<?> peekExprList() {
|
||||
return owner.peekExprList();
|
||||
}
|
||||
|
||||
private Object getBindValue(ValueType valueType, String value) {
|
||||
switch (valueType) {
|
||||
case BOOL:
|
||||
return Boolean.parseBoolean(value);
|
||||
case NUMBER:
|
||||
return new BigDecimal(value);
|
||||
case STRING:
|
||||
return unquote(value);
|
||||
case NAMED_PARAM:
|
||||
return owner.namedParam(value.substring(1));
|
||||
default:
|
||||
throw new IllegalArgumentException("Unhandled valueType " + valueType);
|
||||
}
|
||||
}
|
||||
|
||||
private String unquote(String value) {
|
||||
return value.substring(1, value.length() - 1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package io.ebeaninternal.server.grammer;
|
||||
|
||||
enum EqlOperator {
|
||||
|
||||
EQ,
|
||||
IEQ,
|
||||
NE,
|
||||
LT,
|
||||
LTE,
|
||||
GT,
|
||||
GTE,
|
||||
CONTAINS,
|
||||
STARTS_WITH,
|
||||
ENDS_WITH,
|
||||
LIKE,
|
||||
ICONTAINS,
|
||||
ISTARTS_WITH,
|
||||
IENDS_WITH,
|
||||
ILIKE,
|
||||
BETWEEN
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package io.ebeaninternal.server.grammer;
|
||||
|
||||
import io.ebeaninternal.api.SpiQuery;
|
||||
import io.ebeaninternal.server.grammer.antlr.EQLLexer;
|
||||
import io.ebeaninternal.server.grammer.antlr.EQLParser;
|
||||
import org.antlr.v4.runtime.ANTLRInputStream;
|
||||
import org.antlr.v4.runtime.BaseErrorListener;
|
||||
import org.antlr.v4.runtime.CommonTokenStream;
|
||||
import org.antlr.v4.runtime.RecognitionException;
|
||||
import org.antlr.v4.runtime.Recognizer;
|
||||
import org.antlr.v4.runtime.tree.ParseTreeWalker;
|
||||
|
||||
/**
|
||||
* Parse EQL query language applying it to an ORM query object.
|
||||
*/
|
||||
public class EqlParser {
|
||||
|
||||
private static final ErrorListener errorListener = new ErrorListener();
|
||||
|
||||
/**
|
||||
* Parse the raw EQL query and apply it to the supplied query.
|
||||
*/
|
||||
public static <T> void parse(String raw, SpiQuery<T> query) {
|
||||
|
||||
EQLLexer lexer = new EQLLexer(new ANTLRInputStream(raw));
|
||||
CommonTokenStream tokens = new CommonTokenStream(lexer);
|
||||
EQLParser parser = new EQLParser(tokens);
|
||||
parser.addErrorListener(errorListener);
|
||||
EQLParser.Select_statementContext context = parser.select_statement();
|
||||
|
||||
EqlAdapter<T> adapter = new EqlAdapter<>(query);
|
||||
|
||||
ParseTreeWalker walker = new ParseTreeWalker();
|
||||
walker.walk(adapter, context);
|
||||
|
||||
query.simplifyExpressions();
|
||||
}
|
||||
|
||||
static class ErrorListener extends BaseErrorListener {
|
||||
|
||||
@Override
|
||||
public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) {
|
||||
|
||||
String reportMsg = "line " + line + ":" + charPositionInLine + " " + msg;
|
||||
throw new IllegalArgumentException(reportMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package io.ebeaninternal.server.grammer;
|
||||
|
||||
public class NamedParameter {
|
||||
|
||||
public static final String PREFIX = "$namedParam$";
|
||||
|
||||
private final String name;
|
||||
|
||||
public NamedParameter(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package io.ebeaninternal.server.grammer;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
class OperatorMapping {
|
||||
|
||||
Map<String, EqlOperator> map = new HashMap<>();
|
||||
|
||||
public OperatorMapping() {
|
||||
map.put("eq", EqlOperator.EQ);
|
||||
map.put("=", EqlOperator.EQ);
|
||||
map.put("ieq", EqlOperator.IEQ);
|
||||
|
||||
map.put("ne", EqlOperator.NE);
|
||||
map.put("<>", EqlOperator.NE);
|
||||
map.put("!=", EqlOperator.NE);
|
||||
|
||||
map.put(">", EqlOperator.GT);
|
||||
map.put("gt", EqlOperator.GT);
|
||||
|
||||
map.put(">=", EqlOperator.GTE);
|
||||
map.put("gte", EqlOperator.GTE);
|
||||
map.put("ge", EqlOperator.GTE);
|
||||
|
||||
map.put("<", EqlOperator.LT);
|
||||
map.put("lt", EqlOperator.LT);
|
||||
|
||||
map.put("<=", EqlOperator.LTE);
|
||||
map.put("lte", EqlOperator.LTE);
|
||||
map.put("le", EqlOperator.LTE);
|
||||
|
||||
map.put("contains", EqlOperator.CONTAINS);
|
||||
map.put("startsWith", EqlOperator.STARTS_WITH);
|
||||
map.put("endsWith", EqlOperator.ENDS_WITH);
|
||||
map.put("like", EqlOperator.LIKE);
|
||||
|
||||
map.put("icontains", EqlOperator.ICONTAINS);
|
||||
map.put("istartsWith", EqlOperator.ISTARTS_WITH);
|
||||
map.put("iendsWith", EqlOperator.IENDS_WITH);
|
||||
map.put("ilike", EqlOperator.ILIKE);
|
||||
|
||||
map.put("between", EqlOperator.BETWEEN);
|
||||
}
|
||||
|
||||
public EqlOperator get(String key) {
|
||||
return map.get(key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package io.ebeaninternal.server.grammer;
|
||||
|
||||
import io.ebean.FetchConfig;
|
||||
|
||||
/**
|
||||
* Parse the path that potentially is a FetchConfig definition.
|
||||
*/
|
||||
class ParseFetchConfig {
|
||||
|
||||
/**
|
||||
* Parse the path that potentially is a FetchConfig definition.
|
||||
* <p>
|
||||
* Return the FetchConfig if it is and otherwise null.
|
||||
* </p>
|
||||
*/
|
||||
static FetchConfig parse(String path) {
|
||||
|
||||
if (path.startsWith("lazy")) {
|
||||
if (path.length() == 4) {
|
||||
return new FetchConfig().lazy();
|
||||
} else if (path.charAt(4) == '(') {
|
||||
path = path.substring(5);
|
||||
int batchSize = parseBatchSize(path);
|
||||
return new FetchConfig().lazy(batchSize);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (path.startsWith("query")) {
|
||||
if (path.length() == 5) {
|
||||
return new FetchConfig().query();
|
||||
} else if (path.charAt(5) == '(') {
|
||||
path = path.substring(6);
|
||||
int batchSize = parseBatchSize(path);
|
||||
return new FetchConfig().query(batchSize);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static int parseBatchSize(String path) {
|
||||
path = path.substring(0, path.length() - 1);
|
||||
return Integer.parseInt(path);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
T__0=1
|
||||
T__1=2
|
||||
T__2=3
|
||||
T__3=4
|
||||
T__4=5
|
||||
T__5=6
|
||||
T__6=7
|
||||
T__7=8
|
||||
T__8=9
|
||||
T__9=10
|
||||
T__10=11
|
||||
T__11=12
|
||||
T__12=13
|
||||
T__13=14
|
||||
T__14=15
|
||||
T__15=16
|
||||
T__16=17
|
||||
T__17=18
|
||||
T__18=19
|
||||
T__19=20
|
||||
T__20=21
|
||||
T__21=22
|
||||
T__22=23
|
||||
T__23=24
|
||||
T__24=25
|
||||
T__25=26
|
||||
T__26=27
|
||||
T__27=28
|
||||
T__28=29
|
||||
T__29=30
|
||||
T__30=31
|
||||
T__31=32
|
||||
T__32=33
|
||||
T__33=34
|
||||
T__34=35
|
||||
T__35=36
|
||||
T__36=37
|
||||
T__37=38
|
||||
T__38=39
|
||||
T__39=40
|
||||
T__40=41
|
||||
T__41=42
|
||||
T__42=43
|
||||
T__43=44
|
||||
T__44=45
|
||||
T__45=46
|
||||
T__46=47
|
||||
T__47=48
|
||||
T__48=49
|
||||
T__49=50
|
||||
T__50=51
|
||||
T__51=52
|
||||
T__52=53
|
||||
T__53=54
|
||||
T__54=55
|
||||
T__55=56
|
||||
T__56=57
|
||||
INPUT_VARIABLE=58
|
||||
PATH_VARIABLE=59
|
||||
BOOLEAN_LITERAL=60
|
||||
NUMBER_LITERAL=61
|
||||
DOUBLE=62
|
||||
INT=63
|
||||
ZERO=64
|
||||
STRING_LITERAL=65
|
||||
WS=66
|
||||
'select'=1
|
||||
'('=2
|
||||
')'=3
|
||||
'distinct'=4
|
||||
'where'=5
|
||||
'order'=6
|
||||
'by'=7
|
||||
','=8
|
||||
'nulls'=9
|
||||
'first'=10
|
||||
'last'=11
|
||||
'asc'=12
|
||||
'desc'=13
|
||||
'limit'=14
|
||||
'offset'=15
|
||||
'fetch'=16
|
||||
'+'=17
|
||||
'query'=18
|
||||
'lazy'=19
|
||||
'or'=20
|
||||
'and'=21
|
||||
'not'=22
|
||||
'in'=23
|
||||
'between'=24
|
||||
'is'=25
|
||||
'null'=26
|
||||
'isNull'=27
|
||||
'isNotNull'=28
|
||||
'notNull'=29
|
||||
'empty'=30
|
||||
'isEmpty'=31
|
||||
'isNotEmpty'=32
|
||||
'notEmpty'=33
|
||||
'like'=34
|
||||
'ilike'=35
|
||||
'contains'=36
|
||||
'icontains'=37
|
||||
'startsWith'=38
|
||||
'istartsWith'=39
|
||||
'endsWith'=40
|
||||
'iendsWith'=41
|
||||
'='=42
|
||||
'eq'=43
|
||||
'>'=44
|
||||
'gt'=45
|
||||
'>='=46
|
||||
'ge'=47
|
||||
'gte'=48
|
||||
'<'=49
|
||||
'lt'=50
|
||||
'<='=51
|
||||
'le'=52
|
||||
'lte'=53
|
||||
'<>'=54
|
||||
'!='=55
|
||||
'ne'=56
|
||||
'ieq'=57
|
||||
'0'=64
|
||||
@@ -0,0 +1,769 @@
|
||||
// Generated from /home/rob/github/ebean/src/test/resources/EQL.g4 by ANTLR 4.5.3
|
||||
package io.ebeaninternal.server.grammer.antlr;
|
||||
|
||||
import org.antlr.v4.runtime.ParserRuleContext;
|
||||
import org.antlr.v4.runtime.tree.ErrorNode;
|
||||
import org.antlr.v4.runtime.tree.TerminalNode;
|
||||
|
||||
/**
|
||||
* This class provides an empty implementation of {@link EQLListener},
|
||||
* which can be extended to create a listener which only needs to handle a subset
|
||||
* of the available methods.
|
||||
*/
|
||||
public class EQLBaseListener implements EQLListener {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterSelect_statement(EQLParser.Select_statementContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitSelect_statement(EQLParser.Select_statementContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterSelect_clause(EQLParser.Select_clauseContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitSelect_clause(EQLParser.Select_clauseContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterDistinct(EQLParser.DistinctContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitDistinct(EQLParser.DistinctContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterFetch_clause(EQLParser.Fetch_clauseContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitFetch_clause(EQLParser.Fetch_clauseContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterWhere_clause(EQLParser.Where_clauseContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitWhere_clause(EQLParser.Where_clauseContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterOrderby_clause(EQLParser.Orderby_clauseContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitOrderby_clause(EQLParser.Orderby_clauseContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterOrderby_property(EQLParser.Orderby_propertyContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitOrderby_property(EQLParser.Orderby_propertyContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterNulls_firstlast(EQLParser.Nulls_firstlastContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitNulls_firstlast(EQLParser.Nulls_firstlastContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterAsc_desc(EQLParser.Asc_descContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitAsc_desc(EQLParser.Asc_descContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterLimit_clause(EQLParser.Limit_clauseContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitLimit_clause(EQLParser.Limit_clauseContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterOffset_clause(EQLParser.Offset_clauseContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitOffset_clause(EQLParser.Offset_clauseContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterFetch_path(EQLParser.Fetch_pathContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitFetch_path(EQLParser.Fetch_pathContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterFetch_property_set(EQLParser.Fetch_property_setContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitFetch_property_set(EQLParser.Fetch_property_setContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterFetch_property_group(EQLParser.Fetch_property_groupContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitFetch_property_group(EQLParser.Fetch_property_groupContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterFetch_property(EQLParser.Fetch_propertyContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitFetch_property(EQLParser.Fetch_propertyContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterFetch_query_hint(EQLParser.Fetch_query_hintContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitFetch_query_hint(EQLParser.Fetch_query_hintContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterFetch_lazy_hint(EQLParser.Fetch_lazy_hintContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitFetch_lazy_hint(EQLParser.Fetch_lazy_hintContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterFetch_option(EQLParser.Fetch_optionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitFetch_option(EQLParser.Fetch_optionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterFetch_query_option(EQLParser.Fetch_query_optionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitFetch_query_option(EQLParser.Fetch_query_optionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterFetch_lazy_option(EQLParser.Fetch_lazy_optionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitFetch_lazy_option(EQLParser.Fetch_lazy_optionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterFetch_batch_size(EQLParser.Fetch_batch_sizeContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitFetch_batch_size(EQLParser.Fetch_batch_sizeContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterConditional_expression(EQLParser.Conditional_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitConditional_expression(EQLParser.Conditional_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterConditional_term(EQLParser.Conditional_termContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitConditional_term(EQLParser.Conditional_termContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterConditional_factor(EQLParser.Conditional_factorContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitConditional_factor(EQLParser.Conditional_factorContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterConditional_primary(EQLParser.Conditional_primaryContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitConditional_primary(EQLParser.Conditional_primaryContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterAny_expression(EQLParser.Any_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitAny_expression(EQLParser.Any_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterIn_expression(EQLParser.In_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitIn_expression(EQLParser.In_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterIn_value(EQLParser.In_valueContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitIn_value(EQLParser.In_valueContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterBetween_expression(EQLParser.Between_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitBetween_expression(EQLParser.Between_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterPropertyBetween_expression(EQLParser.PropertyBetween_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitPropertyBetween_expression(EQLParser.PropertyBetween_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterIsNull_expression(EQLParser.IsNull_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitIsNull_expression(EQLParser.IsNull_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterIsNotNull_expression(EQLParser.IsNotNull_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitIsNotNull_expression(EQLParser.IsNotNull_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterIsEmpty_expression(EQLParser.IsEmpty_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitIsEmpty_expression(EQLParser.IsEmpty_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterIsNotEmpty_expression(EQLParser.IsNotEmpty_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitIsNotEmpty_expression(EQLParser.IsNotEmpty_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterLike_expression(EQLParser.Like_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitLike_expression(EQLParser.Like_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterLike_op(EQLParser.Like_opContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitLike_op(EQLParser.Like_opContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterComparison_expression(EQLParser.Comparison_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitComparison_expression(EQLParser.Comparison_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterComparison_operator(EQLParser.Comparison_operatorContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitComparison_operator(EQLParser.Comparison_operatorContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterValue_expression(EQLParser.Value_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitValue_expression(EQLParser.Value_expressionContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterLiteral(EQLParser.LiteralContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitLiteral(EQLParser.LiteralContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void enterEveryRule(ParserRuleContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void exitEveryRule(ParserRuleContext ctx) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void visitTerminal(TerminalNode node) {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* <p>The default implementation does nothing.</p>
|
||||
*/
|
||||
@Override
|
||||
public void visitErrorNode(ErrorNode node) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,319 @@
|
||||
// Generated from /home/rob/github/ebean/src/test/resources/EQL.g4 by ANTLR 4.5.3
|
||||
package io.ebeaninternal.server.grammer.antlr;
|
||||
|
||||
import org.antlr.v4.runtime.CharStream;
|
||||
import org.antlr.v4.runtime.Lexer;
|
||||
import org.antlr.v4.runtime.RecognitionException;
|
||||
import org.antlr.v4.runtime.RuntimeMetaData;
|
||||
import org.antlr.v4.runtime.Vocabulary;
|
||||
import org.antlr.v4.runtime.VocabularyImpl;
|
||||
import org.antlr.v4.runtime.atn.ATN;
|
||||
import org.antlr.v4.runtime.atn.ATNDeserializer;
|
||||
import org.antlr.v4.runtime.atn.LexerATNSimulator;
|
||||
import org.antlr.v4.runtime.atn.PredictionContextCache;
|
||||
import org.antlr.v4.runtime.dfa.DFA;
|
||||
|
||||
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
|
||||
public class EQLLexer extends Lexer {
|
||||
static {
|
||||
RuntimeMetaData.checkVersion("4.5.3", RuntimeMetaData.VERSION);
|
||||
}
|
||||
|
||||
protected static final DFA[] _decisionToDFA;
|
||||
protected static final PredictionContextCache _sharedContextCache =
|
||||
new PredictionContextCache();
|
||||
public static final int
|
||||
T__0 = 1, T__1 = 2, T__2 = 3, T__3 = 4, T__4 = 5, T__5 = 6, T__6 = 7, T__7 = 8, T__8 = 9,
|
||||
T__9 = 10, T__10 = 11, T__11 = 12, T__12 = 13, T__13 = 14, T__14 = 15, T__15 = 16, T__16 = 17,
|
||||
T__17 = 18, T__18 = 19, T__19 = 20, T__20 = 21, T__21 = 22, T__22 = 23, T__23 = 24,
|
||||
T__24 = 25, T__25 = 26, T__26 = 27, T__27 = 28, T__28 = 29, T__29 = 30, T__30 = 31,
|
||||
T__31 = 32, T__32 = 33, T__33 = 34, T__34 = 35, T__35 = 36, T__36 = 37, T__37 = 38,
|
||||
T__38 = 39, T__39 = 40, T__40 = 41, T__41 = 42, T__42 = 43, T__43 = 44, T__44 = 45,
|
||||
T__45 = 46, T__46 = 47, T__47 = 48, T__48 = 49, T__49 = 50, T__50 = 51, T__51 = 52,
|
||||
T__52 = 53, T__53 = 54, T__54 = 55, T__55 = 56, T__56 = 57, INPUT_VARIABLE = 58, PATH_VARIABLE = 59,
|
||||
BOOLEAN_LITERAL = 60, NUMBER_LITERAL = 61, DOUBLE = 62, INT = 63, ZERO = 64, STRING_LITERAL = 65,
|
||||
WS = 66;
|
||||
public static String[] modeNames = {
|
||||
"DEFAULT_MODE"
|
||||
};
|
||||
|
||||
public static final String[] ruleNames = {
|
||||
"T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8",
|
||||
"T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16",
|
||||
"T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24",
|
||||
"T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32",
|
||||
"T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40",
|
||||
"T__41", "T__42", "T__43", "T__44", "T__45", "T__46", "T__47", "T__48",
|
||||
"T__49", "T__50", "T__51", "T__52", "T__53", "T__54", "T__55", "T__56",
|
||||
"INPUT_VARIABLE", "PATH_VARIABLE", "BOOLEAN_LITERAL", "NUMBER_LITERAL",
|
||||
"DOUBLE", "INT", "ZERO", "STRING_LITERAL", "WS"
|
||||
};
|
||||
|
||||
private static final String[] _LITERAL_NAMES = {
|
||||
null, "'select'", "'('", "')'", "'distinct'", "'where'", "'order'", "'by'",
|
||||
"','", "'nulls'", "'first'", "'last'", "'asc'", "'desc'", "'limit'", "'offset'",
|
||||
"'fetch'", "'+'", "'query'", "'lazy'", "'or'", "'and'", "'not'", "'in'",
|
||||
"'between'", "'is'", "'null'", "'isNull'", "'isNotNull'", "'notNull'",
|
||||
"'empty'", "'isEmpty'", "'isNotEmpty'", "'notEmpty'", "'like'", "'ilike'",
|
||||
"'contains'", "'icontains'", "'startsWith'", "'istartsWith'", "'endsWith'",
|
||||
"'iendsWith'", "'='", "'eq'", "'>'", "'gt'", "'>='", "'ge'", "'gte'",
|
||||
"'<'", "'lt'", "'<='", "'le'", "'lte'", "'<>'", "'!='", "'ne'", "'ieq'",
|
||||
null, null, null, null, null, null, "'0'"
|
||||
};
|
||||
private static final String[] _SYMBOLIC_NAMES = {
|
||||
null, null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, null, null,
|
||||
null, null, null, null, null, null, null, null, null, null, "INPUT_VARIABLE",
|
||||
"PATH_VARIABLE", "BOOLEAN_LITERAL", "NUMBER_LITERAL", "DOUBLE", "INT",
|
||||
"ZERO", "STRING_LITERAL", "WS"
|
||||
};
|
||||
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #VOCABULARY} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String[] tokenNames;
|
||||
|
||||
static {
|
||||
tokenNames = new String[_SYMBOLIC_NAMES.length];
|
||||
for (int i = 0; i < tokenNames.length; i++) {
|
||||
tokenNames[i] = VOCABULARY.getLiteralName(i);
|
||||
if (tokenNames[i] == null) {
|
||||
tokenNames[i] = VOCABULARY.getSymbolicName(i);
|
||||
}
|
||||
|
||||
if (tokenNames[i] == null) {
|
||||
tokenNames[i] = "<INVALID>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public String[] getTokenNames() {
|
||||
return tokenNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public Vocabulary getVocabulary() {
|
||||
return VOCABULARY;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void recover(RecognitionException e) {
|
||||
throw new RuntimeException("Error in grammer - " + e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
public EQLLexer(CharStream input) {
|
||||
super(input);
|
||||
_interp = new LexerATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGrammarFileName() {
|
||||
return "EQL.g4";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getRuleNames() {
|
||||
return ruleNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSerializedATN() {
|
||||
return _serializedATN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getModeNames() {
|
||||
return modeNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ATN getATN() {
|
||||
return _ATN;
|
||||
}
|
||||
|
||||
public static final String _serializedATN =
|
||||
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2D\u0200\b\1\4\2\t" +
|
||||
"\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13" +
|
||||
"\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22" +
|
||||
"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31" +
|
||||
"\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!" +
|
||||
"\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4" +
|
||||
",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t" +
|
||||
"\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t=" +
|
||||
"\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\3\3" +
|
||||
"\3\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6" +
|
||||
"\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3" +
|
||||
"\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\16" +
|
||||
"\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20" +
|
||||
"\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\21\3\21\3\22\3\22\3\23\3\23\3\23" +
|
||||
"\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\26\3\26\3\26" +
|
||||
"\3\26\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\31\3\31" +
|
||||
"\3\31\3\31\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\33\3\34\3\34\3\34\3\34" +
|
||||
"\3\34\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\36" +
|
||||
"\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37\3\37\3\37\3 \3" +
|
||||
" \3 \3 \3 \3 \3 \3 \3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3\"\3\"\3\"\3\"\3" +
|
||||
"\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3%" +
|
||||
"\3%\3%\3%\3&\3&\3&\3&\3&\3&\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3" +
|
||||
"\'\3\'\3\'\3\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3)\3" +
|
||||
")\3)\3)\3*\3*\3*\3*\3*\3*\3*\3*\3*\3*\3+\3+\3,\3,\3,\3-\3-\3.\3.\3.\3" +
|
||||
"/\3/\3/\3\60\3\60\3\60\3\61\3\61\3\61\3\61\3\62\3\62\3\63\3\63\3\63\3" +
|
||||
"\64\3\64\3\64\3\65\3\65\3\65\3\66\3\66\3\66\3\66\3\67\3\67\3\67\38\38" +
|
||||
"\38\39\39\39\3:\3:\3:\3:\3;\3;\3;\7;\u01bb\n;\f;\16;\u01be\13;\3<\3<\7" +
|
||||
"<\u01c2\n<\f<\16<\u01c5\13<\3=\3=\3=\3=\3=\3=\3=\3=\3=\5=\u01d0\n=\3>" +
|
||||
"\5>\u01d3\n>\3>\3>\5>\u01d7\n>\3>\3>\5>\u01db\n>\3?\6?\u01de\n?\r?\16" +
|
||||
"?\u01df\3?\3?\7?\u01e4\n?\f?\16?\u01e7\13?\3@\3@\7@\u01eb\n@\f@\16@\u01ee" +
|
||||
"\13@\3A\3A\3B\3B\3B\3B\7B\u01f6\nB\fB\16B\u01f9\13B\3B\3B\3C\3C\3C\3C" +
|
||||
"\2\2D\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35" +
|
||||
"\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36" +
|
||||
";\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67" +
|
||||
"m8o9q:s;u<w=y>{?}@\177A\u0081B\u0083C\u0085D\3\2\t\5\2C\\aac|\6\2\62;" +
|
||||
"C\\aac|\7\2\60\60\62;C\\aac|\3\2\62;\3\2\63;\3\2))\5\2\13\f\17\17\"\"" +
|
||||
"\u020b\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2" +
|
||||
"\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3" +
|
||||
"\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2" +
|
||||
"\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2" +
|
||||
"/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2" +
|
||||
"\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2" +
|
||||
"G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3" +
|
||||
"\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2" +
|
||||
"\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2" +
|
||||
"m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3" +
|
||||
"\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081\3\2\2\2\2\u0083\3\2" +
|
||||
"\2\2\2\u0085\3\2\2\2\3\u0087\3\2\2\2\5\u008e\3\2\2\2\7\u0090\3\2\2\2\t" +
|
||||
"\u0092\3\2\2\2\13\u009b\3\2\2\2\r\u00a1\3\2\2\2\17\u00a7\3\2\2\2\21\u00aa" +
|
||||
"\3\2\2\2\23\u00ac\3\2\2\2\25\u00b2\3\2\2\2\27\u00b8\3\2\2\2\31\u00bd\3" +
|
||||
"\2\2\2\33\u00c1\3\2\2\2\35\u00c6\3\2\2\2\37\u00cc\3\2\2\2!\u00d3\3\2\2" +
|
||||
"\2#\u00d9\3\2\2\2%\u00db\3\2\2\2\'\u00e1\3\2\2\2)\u00e6\3\2\2\2+\u00e9" +
|
||||
"\3\2\2\2-\u00ed\3\2\2\2/\u00f1\3\2\2\2\61\u00f4\3\2\2\2\63\u00fc\3\2\2" +
|
||||
"\2\65\u00ff\3\2\2\2\67\u0104\3\2\2\29\u010b\3\2\2\2;\u0115\3\2\2\2=\u011d" +
|
||||
"\3\2\2\2?\u0123\3\2\2\2A\u012b\3\2\2\2C\u0136\3\2\2\2E\u013f\3\2\2\2G" +
|
||||
"\u0144\3\2\2\2I\u014a\3\2\2\2K\u0153\3\2\2\2M\u015d\3\2\2\2O\u0168\3\2" +
|
||||
"\2\2Q\u0174\3\2\2\2S\u017d\3\2\2\2U\u0187\3\2\2\2W\u0189\3\2\2\2Y\u018c" +
|
||||
"\3\2\2\2[\u018e\3\2\2\2]\u0191\3\2\2\2_\u0194\3\2\2\2a\u0197\3\2\2\2c" +
|
||||
"\u019b\3\2\2\2e\u019d\3\2\2\2g\u01a0\3\2\2\2i\u01a3\3\2\2\2k\u01a6\3\2" +
|
||||
"\2\2m\u01aa\3\2\2\2o\u01ad\3\2\2\2q\u01b0\3\2\2\2s\u01b3\3\2\2\2u\u01b7" +
|
||||
"\3\2\2\2w\u01bf\3\2\2\2y\u01cf\3\2\2\2{\u01da\3\2\2\2}\u01dd\3\2\2\2\177" +
|
||||
"\u01e8\3\2\2\2\u0081\u01ef\3\2\2\2\u0083\u01f1\3\2\2\2\u0085\u01fc\3\2" +
|
||||
"\2\2\u0087\u0088\7u\2\2\u0088\u0089\7g\2\2\u0089\u008a\7n\2\2\u008a\u008b" +
|
||||
"\7g\2\2\u008b\u008c\7e\2\2\u008c\u008d\7v\2\2\u008d\4\3\2\2\2\u008e\u008f" +
|
||||
"\7*\2\2\u008f\6\3\2\2\2\u0090\u0091\7+\2\2\u0091\b\3\2\2\2\u0092\u0093" +
|
||||
"\7f\2\2\u0093\u0094\7k\2\2\u0094\u0095\7u\2\2\u0095\u0096\7v\2\2\u0096" +
|
||||
"\u0097\7k\2\2\u0097\u0098\7p\2\2\u0098\u0099\7e\2\2\u0099\u009a\7v\2\2" +
|
||||
"\u009a\n\3\2\2\2\u009b\u009c\7y\2\2\u009c\u009d\7j\2\2\u009d\u009e\7g" +
|
||||
"\2\2\u009e\u009f\7t\2\2\u009f\u00a0\7g\2\2\u00a0\f\3\2\2\2\u00a1\u00a2" +
|
||||
"\7q\2\2\u00a2\u00a3\7t\2\2\u00a3\u00a4\7f\2\2\u00a4\u00a5\7g\2\2\u00a5" +
|
||||
"\u00a6\7t\2\2\u00a6\16\3\2\2\2\u00a7\u00a8\7d\2\2\u00a8\u00a9\7{\2\2\u00a9" +
|
||||
"\20\3\2\2\2\u00aa\u00ab\7.\2\2\u00ab\22\3\2\2\2\u00ac\u00ad\7p\2\2\u00ad" +
|
||||
"\u00ae\7w\2\2\u00ae\u00af\7n\2\2\u00af\u00b0\7n\2\2\u00b0\u00b1\7u\2\2" +
|
||||
"\u00b1\24\3\2\2\2\u00b2\u00b3\7h\2\2\u00b3\u00b4\7k\2\2\u00b4\u00b5\7" +
|
||||
"t\2\2\u00b5\u00b6\7u\2\2\u00b6\u00b7\7v\2\2\u00b7\26\3\2\2\2\u00b8\u00b9" +
|
||||
"\7n\2\2\u00b9\u00ba\7c\2\2\u00ba\u00bb\7u\2\2\u00bb\u00bc\7v\2\2\u00bc" +
|
||||
"\30\3\2\2\2\u00bd\u00be\7c\2\2\u00be\u00bf\7u\2\2\u00bf\u00c0\7e\2\2\u00c0" +
|
||||
"\32\3\2\2\2\u00c1\u00c2\7f\2\2\u00c2\u00c3\7g\2\2\u00c3\u00c4\7u\2\2\u00c4" +
|
||||
"\u00c5\7e\2\2\u00c5\34\3\2\2\2\u00c6\u00c7\7n\2\2\u00c7\u00c8\7k\2\2\u00c8" +
|
||||
"\u00c9\7o\2\2\u00c9\u00ca\7k\2\2\u00ca\u00cb\7v\2\2\u00cb\36\3\2\2\2\u00cc" +
|
||||
"\u00cd\7q\2\2\u00cd\u00ce\7h\2\2\u00ce\u00cf\7h\2\2\u00cf\u00d0\7u\2\2" +
|
||||
"\u00d0\u00d1\7g\2\2\u00d1\u00d2\7v\2\2\u00d2 \3\2\2\2\u00d3\u00d4\7h\2" +
|
||||
"\2\u00d4\u00d5\7g\2\2\u00d5\u00d6\7v\2\2\u00d6\u00d7\7e\2\2\u00d7\u00d8" +
|
||||
"\7j\2\2\u00d8\"\3\2\2\2\u00d9\u00da\7-\2\2\u00da$\3\2\2\2\u00db\u00dc" +
|
||||
"\7s\2\2\u00dc\u00dd\7w\2\2\u00dd\u00de\7g\2\2\u00de\u00df\7t\2\2\u00df" +
|
||||
"\u00e0\7{\2\2\u00e0&\3\2\2\2\u00e1\u00e2\7n\2\2\u00e2\u00e3\7c\2\2\u00e3" +
|
||||
"\u00e4\7|\2\2\u00e4\u00e5\7{\2\2\u00e5(\3\2\2\2\u00e6\u00e7\7q\2\2\u00e7" +
|
||||
"\u00e8\7t\2\2\u00e8*\3\2\2\2\u00e9\u00ea\7c\2\2\u00ea\u00eb\7p\2\2\u00eb" +
|
||||
"\u00ec\7f\2\2\u00ec,\3\2\2\2\u00ed\u00ee\7p\2\2\u00ee\u00ef\7q\2\2\u00ef" +
|
||||
"\u00f0\7v\2\2\u00f0.\3\2\2\2\u00f1\u00f2\7k\2\2\u00f2\u00f3\7p\2\2\u00f3" +
|
||||
"\60\3\2\2\2\u00f4\u00f5\7d\2\2\u00f5\u00f6\7g\2\2\u00f6\u00f7\7v\2\2\u00f7" +
|
||||
"\u00f8\7y\2\2\u00f8\u00f9\7g\2\2\u00f9\u00fa\7g\2\2\u00fa\u00fb\7p\2\2" +
|
||||
"\u00fb\62\3\2\2\2\u00fc\u00fd\7k\2\2\u00fd\u00fe\7u\2\2\u00fe\64\3\2\2" +
|
||||
"\2\u00ff\u0100\7p\2\2\u0100\u0101\7w\2\2\u0101\u0102\7n\2\2\u0102\u0103" +
|
||||
"\7n\2\2\u0103\66\3\2\2\2\u0104\u0105\7k\2\2\u0105\u0106\7u\2\2\u0106\u0107" +
|
||||
"\7P\2\2\u0107\u0108\7w\2\2\u0108\u0109\7n\2\2\u0109\u010a\7n\2\2\u010a" +
|
||||
"8\3\2\2\2\u010b\u010c\7k\2\2\u010c\u010d\7u\2\2\u010d\u010e\7P\2\2\u010e" +
|
||||
"\u010f\7q\2\2\u010f\u0110\7v\2\2\u0110\u0111\7P\2\2\u0111\u0112\7w\2\2" +
|
||||
"\u0112\u0113\7n\2\2\u0113\u0114\7n\2\2\u0114:\3\2\2\2\u0115\u0116\7p\2" +
|
||||
"\2\u0116\u0117\7q\2\2\u0117\u0118\7v\2\2\u0118\u0119\7P\2\2\u0119\u011a" +
|
||||
"\7w\2\2\u011a\u011b\7n\2\2\u011b\u011c\7n\2\2\u011c<\3\2\2\2\u011d\u011e" +
|
||||
"\7g\2\2\u011e\u011f\7o\2\2\u011f\u0120\7r\2\2\u0120\u0121\7v\2\2\u0121" +
|
||||
"\u0122\7{\2\2\u0122>\3\2\2\2\u0123\u0124\7k\2\2\u0124\u0125\7u\2\2\u0125" +
|
||||
"\u0126\7G\2\2\u0126\u0127\7o\2\2\u0127\u0128\7r\2\2\u0128\u0129\7v\2\2" +
|
||||
"\u0129\u012a\7{\2\2\u012a@\3\2\2\2\u012b\u012c\7k\2\2\u012c\u012d\7u\2" +
|
||||
"\2\u012d\u012e\7P\2\2\u012e\u012f\7q\2\2\u012f\u0130\7v\2\2\u0130\u0131" +
|
||||
"\7G\2\2\u0131\u0132\7o\2\2\u0132\u0133\7r\2\2\u0133\u0134\7v\2\2\u0134" +
|
||||
"\u0135\7{\2\2\u0135B\3\2\2\2\u0136\u0137\7p\2\2\u0137\u0138\7q\2\2\u0138" +
|
||||
"\u0139\7v\2\2\u0139\u013a\7G\2\2\u013a\u013b\7o\2\2\u013b\u013c\7r\2\2" +
|
||||
"\u013c\u013d\7v\2\2\u013d\u013e\7{\2\2\u013eD\3\2\2\2\u013f\u0140\7n\2" +
|
||||
"\2\u0140\u0141\7k\2\2\u0141\u0142\7m\2\2\u0142\u0143\7g\2\2\u0143F\3\2" +
|
||||
"\2\2\u0144\u0145\7k\2\2\u0145\u0146\7n\2\2\u0146\u0147\7k\2\2\u0147\u0148" +
|
||||
"\7m\2\2\u0148\u0149\7g\2\2\u0149H\3\2\2\2\u014a\u014b\7e\2\2\u014b\u014c" +
|
||||
"\7q\2\2\u014c\u014d\7p\2\2\u014d\u014e\7v\2\2\u014e\u014f\7c\2\2\u014f" +
|
||||
"\u0150\7k\2\2\u0150\u0151\7p\2\2\u0151\u0152\7u\2\2\u0152J\3\2\2\2\u0153" +
|
||||
"\u0154\7k\2\2\u0154\u0155\7e\2\2\u0155\u0156\7q\2\2\u0156\u0157\7p\2\2" +
|
||||
"\u0157\u0158\7v\2\2\u0158\u0159\7c\2\2\u0159\u015a\7k\2\2\u015a\u015b" +
|
||||
"\7p\2\2\u015b\u015c\7u\2\2\u015cL\3\2\2\2\u015d\u015e\7u\2\2\u015e\u015f" +
|
||||
"\7v\2\2\u015f\u0160\7c\2\2\u0160\u0161\7t\2\2\u0161\u0162\7v\2\2\u0162" +
|
||||
"\u0163\7u\2\2\u0163\u0164\7Y\2\2\u0164\u0165\7k\2\2\u0165\u0166\7v\2\2" +
|
||||
"\u0166\u0167\7j\2\2\u0167N\3\2\2\2\u0168\u0169\7k\2\2\u0169\u016a\7u\2" +
|
||||
"\2\u016a\u016b\7v\2\2\u016b\u016c\7c\2\2\u016c\u016d\7t\2\2\u016d\u016e" +
|
||||
"\7v\2\2\u016e\u016f\7u\2\2\u016f\u0170\7Y\2\2\u0170\u0171\7k\2\2\u0171" +
|
||||
"\u0172\7v\2\2\u0172\u0173\7j\2\2\u0173P\3\2\2\2\u0174\u0175\7g\2\2\u0175" +
|
||||
"\u0176\7p\2\2\u0176\u0177\7f\2\2\u0177\u0178\7u\2\2\u0178\u0179\7Y\2\2" +
|
||||
"\u0179\u017a\7k\2\2\u017a\u017b\7v\2\2\u017b\u017c\7j\2\2\u017cR\3\2\2" +
|
||||
"\2\u017d\u017e\7k\2\2\u017e\u017f\7g\2\2\u017f\u0180\7p\2\2\u0180\u0181" +
|
||||
"\7f\2\2\u0181\u0182\7u\2\2\u0182\u0183\7Y\2\2\u0183\u0184\7k\2\2\u0184" +
|
||||
"\u0185\7v\2\2\u0185\u0186\7j\2\2\u0186T\3\2\2\2\u0187\u0188\7?\2\2\u0188" +
|
||||
"V\3\2\2\2\u0189\u018a\7g\2\2\u018a\u018b\7s\2\2\u018bX\3\2\2\2\u018c\u018d" +
|
||||
"\7@\2\2\u018dZ\3\2\2\2\u018e\u018f\7i\2\2\u018f\u0190\7v\2\2\u0190\\\3" +
|
||||
"\2\2\2\u0191\u0192\7@\2\2\u0192\u0193\7?\2\2\u0193^\3\2\2\2\u0194\u0195" +
|
||||
"\7i\2\2\u0195\u0196\7g\2\2\u0196`\3\2\2\2\u0197\u0198\7i\2\2\u0198\u0199" +
|
||||
"\7v\2\2\u0199\u019a\7g\2\2\u019ab\3\2\2\2\u019b\u019c\7>\2\2\u019cd\3" +
|
||||
"\2\2\2\u019d\u019e\7n\2\2\u019e\u019f\7v\2\2\u019ff\3\2\2\2\u01a0\u01a1" +
|
||||
"\7>\2\2\u01a1\u01a2\7?\2\2\u01a2h\3\2\2\2\u01a3\u01a4\7n\2\2\u01a4\u01a5" +
|
||||
"\7g\2\2\u01a5j\3\2\2\2\u01a6\u01a7\7n\2\2\u01a7\u01a8\7v\2\2\u01a8\u01a9" +
|
||||
"\7g\2\2\u01a9l\3\2\2\2\u01aa\u01ab\7>\2\2\u01ab\u01ac\7@\2\2\u01acn\3" +
|
||||
"\2\2\2\u01ad\u01ae\7#\2\2\u01ae\u01af\7?\2\2\u01afp\3\2\2\2\u01b0\u01b1" +
|
||||
"\7p\2\2\u01b1\u01b2\7g\2\2\u01b2r\3\2\2\2\u01b3\u01b4\7k\2\2\u01b4\u01b5" +
|
||||
"\7g\2\2\u01b5\u01b6\7s\2\2\u01b6t\3\2\2\2\u01b7\u01b8\7<\2\2\u01b8\u01bc" +
|
||||
"\t\2\2\2\u01b9\u01bb\t\3\2\2\u01ba\u01b9\3\2\2\2\u01bb\u01be\3\2\2\2\u01bc" +
|
||||
"\u01ba\3\2\2\2\u01bc\u01bd\3\2\2\2\u01bdv\3\2\2\2\u01be\u01bc\3\2\2\2" +
|
||||
"\u01bf\u01c3\t\2\2\2\u01c0\u01c2\t\4\2\2\u01c1\u01c0\3\2\2\2\u01c2\u01c5" +
|
||||
"\3\2\2\2\u01c3\u01c1\3\2\2\2\u01c3\u01c4\3\2\2\2\u01c4x\3\2\2\2\u01c5" +
|
||||
"\u01c3\3\2\2\2\u01c6\u01c7\7v\2\2\u01c7\u01c8\7t\2\2\u01c8\u01c9\7w\2" +
|
||||
"\2\u01c9\u01d0\7g\2\2\u01ca\u01cb\7h\2\2\u01cb\u01cc\7c\2\2\u01cc\u01cd" +
|
||||
"\7n\2\2\u01cd\u01ce\7u\2\2\u01ce\u01d0\7g\2\2\u01cf\u01c6\3\2\2\2\u01cf" +
|
||||
"\u01ca\3\2\2\2\u01d0z\3\2\2\2\u01d1\u01d3\7/\2\2\u01d2\u01d1\3\2\2\2\u01d2" +
|
||||
"\u01d3\3\2\2\2\u01d3\u01d4\3\2\2\2\u01d4\u01db\5}?\2\u01d5\u01d7\7/\2" +
|
||||
"\2\u01d6\u01d5\3\2\2\2\u01d6\u01d7\3\2\2\2\u01d7\u01d8\3\2\2\2\u01d8\u01db" +
|
||||
"\5\177@\2\u01d9\u01db\5\u0081A\2\u01da\u01d2\3\2\2\2\u01da\u01d6\3\2\2" +
|
||||
"\2\u01da\u01d9\3\2\2\2\u01db|\3\2\2\2\u01dc\u01de\t\5\2\2\u01dd\u01dc" +
|
||||
"\3\2\2\2\u01de\u01df\3\2\2\2\u01df\u01dd\3\2\2\2\u01df\u01e0\3\2\2\2\u01e0" +
|
||||
"\u01e1\3\2\2\2\u01e1\u01e5\7\60\2\2\u01e2\u01e4\t\5\2\2\u01e3\u01e2\3" +
|
||||
"\2\2\2\u01e4\u01e7\3\2\2\2\u01e5\u01e3\3\2\2\2\u01e5\u01e6\3\2\2\2\u01e6" +
|
||||
"~\3\2\2\2\u01e7\u01e5\3\2\2\2\u01e8\u01ec\t\6\2\2\u01e9\u01eb\t\5\2\2" +
|
||||
"\u01ea\u01e9\3\2\2\2\u01eb\u01ee\3\2\2\2\u01ec\u01ea\3\2\2\2\u01ec\u01ed" +
|
||||
"\3\2\2\2\u01ed\u0080\3\2\2\2\u01ee\u01ec\3\2\2\2\u01ef\u01f0\7\62\2\2" +
|
||||
"\u01f0\u0082\3\2\2\2\u01f1\u01f7\7)\2\2\u01f2\u01f6\n\7\2\2\u01f3\u01f4" +
|
||||
"\7)\2\2\u01f4\u01f6\7)\2\2\u01f5\u01f2\3\2\2\2\u01f5\u01f3\3\2\2\2\u01f6" +
|
||||
"\u01f9\3\2\2\2\u01f7\u01f5\3\2\2\2\u01f7\u01f8\3\2\2\2\u01f8\u01fa\3\2" +
|
||||
"\2\2\u01f9\u01f7\3\2\2\2\u01fa\u01fb\7)\2\2\u01fb\u0084\3\2\2\2\u01fc" +
|
||||
"\u01fd\t\b\2\2\u01fd\u01fe\3\2\2\2\u01fe\u01ff\bC\2\2\u01ff\u0086\3\2" +
|
||||
"\2\2\16\2\u01bc\u01c3\u01cf\u01d2\u01d6\u01da\u01df\u01e5\u01ec\u01f5" +
|
||||
"\u01f7\3\b\2\2";
|
||||
public static final ATN _ATN =
|
||||
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
|
||||
|
||||
static {
|
||||
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
|
||||
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
|
||||
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
T__0=1
|
||||
T__1=2
|
||||
T__2=3
|
||||
T__3=4
|
||||
T__4=5
|
||||
T__5=6
|
||||
T__6=7
|
||||
T__7=8
|
||||
T__8=9
|
||||
T__9=10
|
||||
T__10=11
|
||||
T__11=12
|
||||
T__12=13
|
||||
T__13=14
|
||||
T__14=15
|
||||
T__15=16
|
||||
T__16=17
|
||||
T__17=18
|
||||
T__18=19
|
||||
T__19=20
|
||||
T__20=21
|
||||
T__21=22
|
||||
T__22=23
|
||||
T__23=24
|
||||
T__24=25
|
||||
T__25=26
|
||||
T__26=27
|
||||
T__27=28
|
||||
T__28=29
|
||||
T__29=30
|
||||
T__30=31
|
||||
T__31=32
|
||||
T__32=33
|
||||
T__33=34
|
||||
T__34=35
|
||||
T__35=36
|
||||
T__36=37
|
||||
T__37=38
|
||||
T__38=39
|
||||
T__39=40
|
||||
T__40=41
|
||||
T__41=42
|
||||
T__42=43
|
||||
T__43=44
|
||||
T__44=45
|
||||
T__45=46
|
||||
T__46=47
|
||||
T__47=48
|
||||
T__48=49
|
||||
T__49=50
|
||||
T__50=51
|
||||
T__51=52
|
||||
T__52=53
|
||||
T__53=54
|
||||
T__54=55
|
||||
T__55=56
|
||||
T__56=57
|
||||
INPUT_VARIABLE=58
|
||||
PATH_VARIABLE=59
|
||||
BOOLEAN_LITERAL=60
|
||||
NUMBER_LITERAL=61
|
||||
DOUBLE=62
|
||||
INT=63
|
||||
ZERO=64
|
||||
STRING_LITERAL=65
|
||||
WS=66
|
||||
'select'=1
|
||||
'('=2
|
||||
')'=3
|
||||
'distinct'=4
|
||||
'where'=5
|
||||
'order'=6
|
||||
'by'=7
|
||||
','=8
|
||||
'nulls'=9
|
||||
'first'=10
|
||||
'last'=11
|
||||
'asc'=12
|
||||
'desc'=13
|
||||
'limit'=14
|
||||
'offset'=15
|
||||
'fetch'=16
|
||||
'+'=17
|
||||
'query'=18
|
||||
'lazy'=19
|
||||
'or'=20
|
||||
'and'=21
|
||||
'not'=22
|
||||
'in'=23
|
||||
'between'=24
|
||||
'is'=25
|
||||
'null'=26
|
||||
'isNull'=27
|
||||
'isNotNull'=28
|
||||
'notNull'=29
|
||||
'empty'=30
|
||||
'isEmpty'=31
|
||||
'isNotEmpty'=32
|
||||
'notEmpty'=33
|
||||
'like'=34
|
||||
'ilike'=35
|
||||
'contains'=36
|
||||
'icontains'=37
|
||||
'startsWith'=38
|
||||
'istartsWith'=39
|
||||
'endsWith'=40
|
||||
'iendsWith'=41
|
||||
'='=42
|
||||
'eq'=43
|
||||
'>'=44
|
||||
'gt'=45
|
||||
'>='=46
|
||||
'ge'=47
|
||||
'gte'=48
|
||||
'<'=49
|
||||
'lt'=50
|
||||
'<='=51
|
||||
'le'=52
|
||||
'lte'=53
|
||||
'<>'=54
|
||||
'!='=55
|
||||
'ne'=56
|
||||
'ieq'=57
|
||||
'0'=64
|
||||
@@ -0,0 +1,570 @@
|
||||
// Generated from /home/rob/github/ebean/src/test/resources/EQL.g4 by ANTLR 4.5.3
|
||||
package io.ebeaninternal.server.grammer.antlr;
|
||||
|
||||
import org.antlr.v4.runtime.tree.ParseTreeListener;
|
||||
|
||||
/**
|
||||
* This interface defines a complete listener for a parse tree produced by
|
||||
* {@link EQLParser}.
|
||||
*/
|
||||
public interface EQLListener extends ParseTreeListener {
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#select_statement}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterSelect_statement(EQLParser.Select_statementContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#select_statement}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitSelect_statement(EQLParser.Select_statementContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#select_clause}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterSelect_clause(EQLParser.Select_clauseContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#select_clause}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitSelect_clause(EQLParser.Select_clauseContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#distinct}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterDistinct(EQLParser.DistinctContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#distinct}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitDistinct(EQLParser.DistinctContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#fetch_clause}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterFetch_clause(EQLParser.Fetch_clauseContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#fetch_clause}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitFetch_clause(EQLParser.Fetch_clauseContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#where_clause}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterWhere_clause(EQLParser.Where_clauseContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#where_clause}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitWhere_clause(EQLParser.Where_clauseContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#orderby_clause}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterOrderby_clause(EQLParser.Orderby_clauseContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#orderby_clause}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitOrderby_clause(EQLParser.Orderby_clauseContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#orderby_property}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterOrderby_property(EQLParser.Orderby_propertyContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#orderby_property}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitOrderby_property(EQLParser.Orderby_propertyContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#nulls_firstlast}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterNulls_firstlast(EQLParser.Nulls_firstlastContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#nulls_firstlast}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitNulls_firstlast(EQLParser.Nulls_firstlastContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#asc_desc}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterAsc_desc(EQLParser.Asc_descContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#asc_desc}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitAsc_desc(EQLParser.Asc_descContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#limit_clause}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterLimit_clause(EQLParser.Limit_clauseContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#limit_clause}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitLimit_clause(EQLParser.Limit_clauseContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#offset_clause}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterOffset_clause(EQLParser.Offset_clauseContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#offset_clause}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitOffset_clause(EQLParser.Offset_clauseContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#fetch_path}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterFetch_path(EQLParser.Fetch_pathContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#fetch_path}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitFetch_path(EQLParser.Fetch_pathContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#fetch_property_set}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterFetch_property_set(EQLParser.Fetch_property_setContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#fetch_property_set}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitFetch_property_set(EQLParser.Fetch_property_setContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#fetch_property_group}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterFetch_property_group(EQLParser.Fetch_property_groupContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#fetch_property_group}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitFetch_property_group(EQLParser.Fetch_property_groupContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#fetch_property}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterFetch_property(EQLParser.Fetch_propertyContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#fetch_property}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitFetch_property(EQLParser.Fetch_propertyContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#fetch_query_hint}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterFetch_query_hint(EQLParser.Fetch_query_hintContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#fetch_query_hint}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitFetch_query_hint(EQLParser.Fetch_query_hintContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#fetch_lazy_hint}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterFetch_lazy_hint(EQLParser.Fetch_lazy_hintContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#fetch_lazy_hint}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitFetch_lazy_hint(EQLParser.Fetch_lazy_hintContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#fetch_option}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterFetch_option(EQLParser.Fetch_optionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#fetch_option}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitFetch_option(EQLParser.Fetch_optionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#fetch_query_option}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterFetch_query_option(EQLParser.Fetch_query_optionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#fetch_query_option}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitFetch_query_option(EQLParser.Fetch_query_optionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#fetch_lazy_option}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterFetch_lazy_option(EQLParser.Fetch_lazy_optionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#fetch_lazy_option}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitFetch_lazy_option(EQLParser.Fetch_lazy_optionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#fetch_batch_size}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterFetch_batch_size(EQLParser.Fetch_batch_sizeContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#fetch_batch_size}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitFetch_batch_size(EQLParser.Fetch_batch_sizeContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#conditional_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterConditional_expression(EQLParser.Conditional_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#conditional_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitConditional_expression(EQLParser.Conditional_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#conditional_term}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterConditional_term(EQLParser.Conditional_termContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#conditional_term}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitConditional_term(EQLParser.Conditional_termContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#conditional_factor}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterConditional_factor(EQLParser.Conditional_factorContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#conditional_factor}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitConditional_factor(EQLParser.Conditional_factorContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#conditional_primary}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterConditional_primary(EQLParser.Conditional_primaryContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#conditional_primary}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitConditional_primary(EQLParser.Conditional_primaryContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#any_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterAny_expression(EQLParser.Any_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#any_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitAny_expression(EQLParser.Any_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#in_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterIn_expression(EQLParser.In_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#in_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitIn_expression(EQLParser.In_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#in_value}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterIn_value(EQLParser.In_valueContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#in_value}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitIn_value(EQLParser.In_valueContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#between_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterBetween_expression(EQLParser.Between_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#between_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitBetween_expression(EQLParser.Between_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#propertyBetween_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterPropertyBetween_expression(EQLParser.PropertyBetween_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#propertyBetween_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitPropertyBetween_expression(EQLParser.PropertyBetween_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#isNull_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterIsNull_expression(EQLParser.IsNull_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#isNull_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitIsNull_expression(EQLParser.IsNull_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#isNotNull_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterIsNotNull_expression(EQLParser.IsNotNull_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#isNotNull_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitIsNotNull_expression(EQLParser.IsNotNull_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#isEmpty_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterIsEmpty_expression(EQLParser.IsEmpty_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#isEmpty_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitIsEmpty_expression(EQLParser.IsEmpty_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#isNotEmpty_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterIsNotEmpty_expression(EQLParser.IsNotEmpty_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#isNotEmpty_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitIsNotEmpty_expression(EQLParser.IsNotEmpty_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#like_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterLike_expression(EQLParser.Like_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#like_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitLike_expression(EQLParser.Like_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#like_op}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterLike_op(EQLParser.Like_opContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#like_op}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitLike_op(EQLParser.Like_opContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#comparison_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterComparison_expression(EQLParser.Comparison_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#comparison_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitComparison_expression(EQLParser.Comparison_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#comparison_operator}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterComparison_operator(EQLParser.Comparison_operatorContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#comparison_operator}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitComparison_operator(EQLParser.Comparison_operatorContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#value_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterValue_expression(EQLParser.Value_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#value_expression}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitValue_expression(EQLParser.Value_expressionContext ctx);
|
||||
|
||||
/**
|
||||
* Enter a parse tree produced by {@link EQLParser#literal}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void enterLiteral(EQLParser.LiteralContext ctx);
|
||||
|
||||
/**
|
||||
* Exit a parse tree produced by {@link EQLParser#literal}.
|
||||
*
|
||||
* @param ctx the parse tree
|
||||
*/
|
||||
void exitLiteral(EQLParser.LiteralContext ctx);
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user