net.sf.jsqlparser.expression.BinaryExpression Java Examples
The following examples show how to use
net.sf.jsqlparser.expression.BinaryExpression.
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: ObjPD.java From openprodoc with GNU Affero General Public License v3.0 | 6 votes |
private int EvalExprType(Expression where) { if (where instanceof AndExpression) return (EXPR_AND); else if (where instanceof OrExpression) return (EXPR_OR); else if (where instanceof BinaryExpression) return(EXPR_BASIC); else if (where instanceof Function) return(EXPR_FUNCT); else if (where instanceof Parenthesis) return (EXPR_PAR); else if (where instanceof InExpression) return (EXPR_IN); else if (where instanceof NotExpression) return (EXPR_NOT); return(-1); }
Example #2
Source File: WhereVisitorMatchAndLookupPipelineMatchBuilder.java From sql-to-mongo-db-query-converter with Apache License 2.0 | 5 votes |
protected void visitBinaryExpression(BinaryExpression expr) { this.isBaseAliasOrValue = true; expr.getLeftExpression().accept(this); if(!this.isBaseAliasOrValue) { expr.getRightExpression().accept(this); } else { expr.getRightExpression().accept(this); if(this.isBaseAliasOrValue && !(expr instanceof AndExpression || expr instanceof OrExpression)) { this.setOrAndExpression(outputMatch,expr); } } }
Example #3
Source File: CTEToNestedQueryConverter.java From quetzal with Eclipse Public License 2.0 | 5 votes |
public void visitBinary(BinaryExpression exp, boolean allowLeftAndRightTable) { clear(); boolean prevIsTopVal = isTopLevel; boolean tmpLeftTableFound = false; boolean tmpRightTableFound = false; boolean tmpWhereOnlyExpFound = false; isTopLevel = false; exp.getLeftExpression().accept(this); // update tmp tmpLeftTableFound |= leftTableFound; tmpRightTableFound |= rightTableFound; tmpWhereOnlyExpFound |= whereOnlyExpFound; // exp.getRightExpression().accept(this); //update tmp tmpLeftTableFound |= leftTableFound; tmpRightTableFound |= rightTableFound; tmpWhereOnlyExpFound |= whereOnlyExpFound; // // update leftTableFound = tmpLeftTableFound; rightTableFound = tmpRightTableFound; whereOnlyExpFound = tmpWhereOnlyExpFound; // if (!allowLeftAndRightTable && leftTableFound && rightTableFound) { whereOnlyExpFound = true; } isTopLevel = prevIsTopVal; defaultTopLevelProcessing(exp); }
Example #4
Source File: ExpressionVisitorImpl.java From DataPermissionHelper with Apache License 2.0 | 4 votes |
public void visitBinaryExpression(BinaryExpression binaryExpression) { binaryExpression.getLeftExpression() .accept(new ExpressionVisitorImpl()); binaryExpression.getRightExpression().accept( new ExpressionVisitorImpl()); }