Examples of parseCreateTable()


Examples of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseCreateTable()

                     + "DESCRIPTION TEXT, " //
                     + "ICONURL VARCHAR(255), " //
                     + "CONSTRAINT PK_issuestatus PRIMARY KEY (ID))"; //

        MySqlStatementParser parser = new MySqlStatementParser(sql);
        SQLStatement stmt = parser.parseCreateTable();

        MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
        stmt.accept(visitor);

        System.out.println("Tables : " + visitor.getTables());
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseCreateTable()

                                 + "`create_time` datetime NOT NULL COMMENT '授权时间',"//
                                 + "`invalid_time` datetime NOT NULL COMMENT '授权失效时间'," + "PRIMARY KEY USING BTREE (`auth_id`)"//
                                 + ") ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='INS_EBAY_AUTH';";

        MySqlStatementParser parser = new MySqlStatementParser(sql);
        SQLStatement stmt = parser.parseCreateTable();

        MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
        stmt.accept(visitor);

        System.out.println("Tables : " + visitor.getTables());
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseCreateTable()

                                 + "`create_time` datetime NOT NULL COMMENT '授权时间',"//
                                 + "`invalid_time` datetime NOT NULL COMMENT '授权失效时间'," + "PRIMARY KEY USING BTREE (`auth_id`), INDEX `ind_usr_id` USING BTREE(`usr_id`)"//
                                 + ") ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='INS_EBAY_AUTH';";

        MySqlStatementParser parser = new MySqlStatementParser(sql);
        SQLStatement stmt = parser.parseCreateTable();

        MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
        stmt.accept(visitor);

        System.out.println("Tables : " + visitor.getTables());
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseCreateTable()

                                 + "`create_time` datetime NOT NULL COMMENT '授权时间',"//
                                 + "`invalid_time` datetime NOT NULL COMMENT '授权失效时间'," + "PRIMARY KEY USING BTREE (`auth_id`), KEY `ind_usr_id` USING BTREE (`usr_id`)"//
                                 + ") ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='INS_EBAY_AUTH';";

        MySqlStatementParser parser = new MySqlStatementParser(sql);
        SQLStatement stmt = parser.parseCreateTable();

        MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
        stmt.accept(visitor);

        System.out.println("Tables : " + visitor.getTables());
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseCreateTable()

                     + "        cpid varchar(36),"//
                     + "        primary key (cid)"//
                     + "    )"; //

        MySqlStatementParser parser = new MySqlStatementParser(sql);
        SQLStatement stmt = parser.parseCreateTable();

        MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
        stmt.accept(visitor);

        System.out.println("Tables : " + visitor.getTables());
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseCreateTable()

                     + "`Id` int(11) NOT NULL," //
                     + "`text` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL"//
                     + ") ENGINE=InnoDB DEFAULT CHARSET=gbk";

        MySqlStatementParser parser = new MySqlStatementParser(sql);
        SQLStatement stmt = parser.parseCreateTable();

        MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
        stmt.accept(visitor);

        System.out.println("Tables : " + visitor.getTables());
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseCreateTable()

                     + "    CONSTRAINT fk_ao_e8b6cc_repo_to_changeset_changeset_id FOREIGN KEY (CHANGESET_ID) REFERENCES AO_E8B6CC_CHANGESET_MAPPING(ID),"//
                     + "    PRIMARY KEY(ID)"//
                     + ") ENGINE=InnoDB"; //

        MySqlStatementParser parser = new MySqlStatementParser(sql);
        SQLStatement stmt = parser.parseCreateTable();

        MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
        stmt.accept(visitor);

        System.out.println("Tables : " + visitor.getTables());
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseCreateTable()

                                 + "`create_time` datetime NOT NULL COMMENT '授权时间',"//
                                 + "`invalid_time` datetime NOT NULL COMMENT '授权失效时间'," + "PRIMARY KEY (`auth_id`)"//
                                 + ") ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='INS_EBAY_AUTH';";

        MySqlStatementParser parser = new MySqlStatementParser(sql);
        SQLStatement stmt = parser.parseCreateTable();

        MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
        stmt.accept(visitor);

        System.out.println("Tables : " + visitor.getTables());
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseCreateTable()

        String sql = "CREATE TABLE lookup" + //
                     "  (id INT, INDEX USING BTREE (id))" + //
                     "  STATS_PERSISTENT 1;"; //

        MySqlStatementParser parser = new MySqlStatementParser(sql);
        SQLStatement stmt = parser.parseCreateTable();

        MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
        stmt.accept(visitor);

        System.out.println("Tables : " + visitor.getTables());
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseCreateTable()

    @Test
    public void test_UNSIGNED_ZEROFILL() throws Exception {
        String sql = "CREATE TABLE t1 (year YEAR(4), month INT(2) UNSIGNED ZEROFILL, day INT(2) UNSIGNED ZEROFILL);";

        MySqlStatementParser parser = new MySqlStatementParser(sql);
        SQLStatement stmt = parser.parseCreateTable();

        MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
        stmt.accept(visitor);

        System.out.println("Tables : " + visitor.getTables());
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.