Package com.alibaba.druid.sql.dialect.mysql.ast.statement

Examples of com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlPartitioningDef$InValues


                if (lexer.token() == Token.LPAREN) {
                    lexer.nextToken();
                    for (;;) {
                        acceptIdentifier("PARTITION");

                        MySqlPartitioningDef partitionDef = new MySqlPartitioningDef();

                        partitionDef.setName(this.exprParser.name());

                        if (lexer.token() == Token.VALUES) {
                            lexer.nextToken();
                            if (lexer.token() == Token.IN) {
                                lexer.nextToken();
                                MySqlPartitioningDef.InValues values = new MySqlPartitioningDef.InValues();

                                accept(Token.LPAREN);
                                this.exprParser.exprList(values.getItems(), values);
                                accept(Token.RPAREN);
                                partitionDef.setValues(values);
                            } else {
                                acceptIdentifier("LESS");
                                acceptIdentifier("THAN");

                                MySqlPartitioningDef.LessThanValues values = new MySqlPartitioningDef.LessThanValues();

                                accept(Token.LPAREN);
                                this.exprParser.exprList(values.getItems(), values);
                                accept(Token.RPAREN);
                                partitionDef.setValues(values);
                            }
                        }

                        for (;;) {
                            if (identifierEquals("DATA")) {
                                lexer.nextToken();
                                acceptIdentifier("DIRECTORY");
                                if (lexer.token() == Token.EQ) {
                                    lexer.nextToken();
                                }
                                partitionDef.setDataDirectory(this.exprParser.expr());
                            } else if (lexer.token() == Token.INDEX) {
                                lexer.nextToken();
                                acceptIdentifier("DIRECTORY");
                                if (lexer.token() == Token.EQ) {
                                    lexer.nextToken();
                                }
                                partitionDef.setIndexDirectory(this.exprParser.expr());
                            } else {
                                break;
                            }
                        }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlPartitioningDef$InValues

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.