Examples of SQLName


Examples of com.alibaba.druid.sql.ast.SQLName

       
        if (lexer.token() == Token.DEFAULT || lexer.token() == Token.NOT || lexer.token() == Token.NULL) {
            return null;
        }
       
        SQLName typeExpr = name();
        String typeName = typeExpr.toString();
       
        if (lexer.token() == Token.PERCENT) {
            lexer.nextToken();
            if (identifierEquals("TYPE")) {
                lexer.nextToken();
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

            lexer.nextToken();
        }
    }
   
    public SQLName name() throws ParserException {
        SQLName name = super.name();
       
        if (lexer.token() == Token.MONKEYS_AT) {
            lexer.nextToken();
            if (lexer.token() != Token.IDENTIFIER) {
                throw new ParserException("syntax error, expect identifier, but " + lexer.token());
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

        if (lexer.token() == Token.OF) {
            if (expr instanceof SQLIdentifierExpr) {
                String name = ((SQLIdentifierExpr) expr).getName();
                if ("CURRENT".equalsIgnoreCase(name)) {
                    lexer.nextToken();
                    SQLName cursorName = this.name();
                    return new SQLCurrentOfCursorExpr(cursorName);
                }
            }
        }
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

            lexer.nextToken();
        } else {
            throw new ParserException("error " + lexer.token());
        }

        SQLName name = new SQLIdentifierExpr(identName);

        name = nameRest(name);

        return name;
    }
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

        if (lexer.token() == Token.DEFAULT || lexer.token() == Token.NOT || lexer.token() == Token.NULL) {
            return null;
        }

        SQLName typeExpr = name();
        String typeName = typeExpr.toString();

        SQLDataType dataType = new SQLDataTypeImpl(typeName);
        return parseDataTypeRest(dataType);
    }
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

            if (lexer.token() == Token.DROP) {
                lexer.nextToken();

                if (lexer.token() == Token.TABLE) {
                    lexer.nextToken();
                    SQLName name = this.exprParser.name();
                    statementList.add(new SQLDropTableStatement(name));
                    continue;
                }
            }
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

        accept(Token.INSERT);
        accept(Token.INTO);

        SQLInsertStatement insertStatement = new SQLInsertStatement();

        SQLName tableName = this.exprParser.name();
        insertStatement.setTableName(tableName);
       
        if (lexer.token() == Token.IDENTIFIER) {
            insertStatement.setAlias(lexer.stringVal());
            lexer.nextToken();
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

        lexer.nextToken();
        if (lexer.token() == (Token.FROM)) {
            lexer.nextToken();
        }

        SQLName tableName = exprParser.name();

        SQLDeleteStatement deleteStatement = new SQLDeleteStatement();
        deleteStatement.setTableName(tableName);

        if (lexer.token() == (Token.WHERE)) {
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

            lexer.nextToken();
        } else {
            throw new ParserException("error");
        }

        SQLName name = new SQLIdentifierExpr(identName);

        if (lexer.token() == Token.DOT) {
            lexer.nextToken();

            if (lexer.token() != Token.IDENTIFIER) {
View Full Code Here

Examples of com.alibaba.druid.sql.ast.SQLName

    private MySqlShowTablesStatement parseShowTabless() throws ParserException {
        MySqlShowTablesStatement stmt = new MySqlShowTablesStatement();

        if (lexer.token() == Token.FROM) {
            lexer.nextToken();
            SQLName database = exprParser.name();
            stmt.setDatabase(database);
        }

        if (lexer.token() == Token.LIKE) {
            lexer.nextToken();
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.