Package com.alibaba.druid.sql.dialect.sqlserver.ast.stmt

Examples of com.alibaba.druid.sql.dialect.sqlserver.ast.stmt.SQLServerSetStatement


        }

        if (identifierEquals("STATISTICS")) {
            lexer.nextToken();

            SQLServerSetStatement stmt = new SQLServerSetStatement();

            if (identifierEquals("IO") || identifierEquals("XML") || identifierEquals("PROFILE")
                || identifierEquals("TIME")) {
                stmt.getItem().setTarget(new SQLIdentifierExpr("STATISTICS " + lexer.stringVal().toUpperCase()));

                lexer.nextToken();
                if (lexer.token() == Token.ON) {
                    stmt.getItem().setValue(new SQLIdentifierExpr("ON"));
                    lexer.nextToken();
                } else if (identifierEquals("OFF")) {
                    stmt.getItem().setValue(new SQLIdentifierExpr("OFF"));
                    lexer.nextToken();
                }
            }
            return stmt;
        }

        if (lexer.token() == Token.VARIANT) {
            SQLSetStatement stmt = new SQLSetStatement(getDbType());
            parseAssignItems(stmt.getItems(), stmt);
            return stmt;
        } else {
            SQLServerSetStatement stmt = new SQLServerSetStatement();
            stmt.getItem().setTarget(this.exprParser.expr());

            if (lexer.token() == Token.ON) {
                stmt.getItem().setValue(new SQLIdentifierExpr("ON"));
                lexer.nextToken();
            } else if (identifierEquals("OFF")) {
                stmt.getItem().setValue(new SQLIdentifierExpr("OFF"));
                lexer.nextToken();
            } else {
                stmt.getItem().setValue(this.exprParser.expr());
            }
            return stmt;
        }
    }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.sql.dialect.sqlserver.ast.stmt.SQLServerSetStatement

Copyright © 2018 www.massapicom. 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.