Package com.alibaba.druid.sql.ast.expr

Examples of com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr.accept()


    public boolean visit(SQLBinaryOpExpr x) {
        if (x.getLeft() instanceof SQLBinaryOpExpr) {
            SQLBinaryOpExpr left = (SQLBinaryOpExpr) x.getLeft();
            if (left.getOperator().priority > x.getOperator().priority) {
                print('(');
                left.accept(this);
                print(')');
            } else {
                left.accept(this);
            }
        } else {
View Full Code Here


            if (left.getOperator().priority > x.getOperator().priority) {
                print('(');
                left.accept(this);
                print(')');
            } else {
                left.accept(this);
            }
        } else {
            x.getLeft().accept(this);
        }
View Full Code Here

        if (x.getRight() instanceof SQLBinaryOpExpr) {
            SQLBinaryOpExpr right = (SQLBinaryOpExpr) x.getRight();
            if (right.getOperator().priority >= x.getOperator().priority) {
                print('(');
                right.accept(this);
                print(')');
            } else {
                right.accept(this);
            }
        } else {
View Full Code Here

            if (right.getOperator().priority >= x.getOperator().priority) {
                print('(');
                right.accept(this);
                print(')');
            } else {
                right.accept(this);
            }
        } else {
            x.getRight().accept(this);
        }
View Full Code Here

                if (rightRational) {
                    incrementIndent();
                }

                print('(');
                right.accept(this);
                print(')');

                if (rightRational) {
                    decrementIndent();
                }
View Full Code Here

                if (rightRational) {
                    decrementIndent();
                }
            } else {
                right.accept(this);
            }
        } else {
            x.getRight().accept(this);
        }
    }
View Full Code Here

                if (rightRational) {
                    incrementIndent();
                }

                print('(');
                right.accept(this);
                print(')');

                if (rightRational) {
                    decrementIndent();
                }
View Full Code Here

                if (rightRational) {
                    decrementIndent();
                }
            } else {
                right.accept(this);
            }
        } else {
            x.getRight().accept(this);
        }
    }
View Full Code Here

                if (rightRational) {
                    incrementIndent();
                }

                print('(');
                right.accept(this);
                print(')');

                if (rightRational) {
                    decrementIndent();
                }
View Full Code Here

                if (rightRational) {
                    decrementIndent();
                }
            } else {
                right.accept(this);
            }
        } else {
            x.getRight().accept(this);
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.