Java Code Examples for com.alibaba.fastsql.sql.ast.SQLExpr#accept()

The following examples show how to use com.alibaba.fastsql.sql.ast.SQLExpr#accept() . 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: ContextExecuter.java    From Mycat2 with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean visit(SQLAssignItem x) {
    SQLExpr target = x.getTarget();//不处理
    SQLExpr value = x.getValue();
    value.accept(this);
    return false;//不需要再次遍历
}
 
Example 2
Source File: SqlToExprTranslator.java    From Mycat2 with GNU General Public License v3.0 4 votes vote down vote up
private SqlValue convertExpr(SQLExpr where) {
    RexTranslator rexTranslator = new RexTranslator(rexBuilder);
    where.accept(rexTranslator);
    return rexTranslator.result;
}
 
Example 3
Source File: RexTranslator.java    From Mycat2 with GNU General Public License v3.0 4 votes vote down vote up
SqlValue convertExpr(SQLExpr expr) {
    RexTranslator rexTranslator = new RexTranslator(relBuilder);
    expr.accept(rexTranslator);
    return rexTranslator.result;
}