Search in sources :

Example 1 with SQLServerObjectReferenceExpr

use of com.alibaba.druid.sql.dialect.sqlserver.ast.expr.SQLServerObjectReferenceExpr in project druid by alibaba.

the class SQLServerExprParser method nameRest.

public SQLName nameRest(SQLName expr) {
    if (lexer.token() == Token.DOTDOT) {
        lexer.nextToken();
        boolean backet = false;
        if (lexer.token() == Token.LBRACKET) {
            lexer.nextToken();
            backet = true;
        }
        String text = lexer.stringVal();
        lexer.nextToken();
        if (backet) {
            accept(Token.RBRACKET);
        }
        SQLServerObjectReferenceExpr owner = new SQLServerObjectReferenceExpr(expr);
        expr = new SQLPropertyExpr(owner, text);
    }
    return super.nameRest(expr);
}
Also used : SQLServerObjectReferenceExpr(com.alibaba.druid.sql.dialect.sqlserver.ast.expr.SQLServerObjectReferenceExpr) SQLPropertyExpr(com.alibaba.druid.sql.ast.expr.SQLPropertyExpr)

Aggregations

SQLPropertyExpr (com.alibaba.druid.sql.ast.expr.SQLPropertyExpr)1 SQLServerObjectReferenceExpr (com.alibaba.druid.sql.dialect.sqlserver.ast.expr.SQLServerObjectReferenceExpr)1