Examples of parseCreateTable()


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

                     + "\nKEY `sid_ty_time` (`sellerId`,`node_type`,`start_time`),"
                     + "\nCONSTRAINT `t_activity_node_ibfk_1` FOREIGN KEY (`canvas_id`) REFERENCES `t_activity_canvas` (`id`) ON DELETE CASCADE"
                     + "\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;";

        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_union() throws Exception {
        String sql = "CREATE TABLE tableA (datasn varchar(100) NOT NULL,PRIMARY KEY(datasn)) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=(tableB,tableC)";

        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_union() throws Exception {
        String sql = "CREATE TABLE tableA (datasn varchar(100) NOT NULL,PRIMARY KEY(datasn)) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=(tableB)";

        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()

                     + "  `ida` INT NOT NULL COMMENT 'aaa' ,"//
                     + "  PRIMARY KEY (`ida`) )"//
                     + " COMMENT = 'bb';"; //

        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.