Package com.alibaba.druid.sql.dialect.mysql.parser

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


   
    public void test_show_open_plugins() throws Exception {
        String sql = "SHOW plugins";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowPluginsStatement show = (MySqlShowPluginsStatement) parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toMySqlString(show);
        Assert.assertEquals("SHOW PLUGINS", output);
    }
   
    public void test_show_PRIVILEGES() throws Exception {
View Full Code Here


   
    public void test_show_PRIVILEGES() throws Exception {
        String sql = "SHOW PRIVILEGES";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowPrivilegesStatement show = (MySqlShowPrivilegesStatement) parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toMySqlString(show);
        Assert.assertEquals("SHOW PRIVILEGES", output);
    }
   
    public void test_show_procedure_code() throws Exception {
View Full Code Here

   
    public void test_show_procedure_code() throws Exception {
        String sql = "SHOW procedure code x";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowProcedureCodeStatement show = (MySqlShowProcedureCodeStatement) parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toMySqlString(show);
        Assert.assertEquals("SHOW PROCEDURE CODE x", output);
    }
   
    public void test_show_procedure_status() throws Exception {
View Full Code Here

   
    public void test_show_procedure_status() throws Exception {
        String sql = "SHOW procedure status like '%'";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowProcedureStatusStatement show = (MySqlShowProcedureStatusStatement) parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toMySqlString(show);
        Assert.assertEquals("SHOW PROCEDURE STATUS LIKE '%'", output);
    }
   
    public void test_show_procedure_status_1() throws Exception {
View Full Code Here

   
    public void test_show_procedure_status_1() throws Exception {
        String sql = "SHOW procedure status where 1 = 1";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowProcedureStatusStatement show = (MySqlShowProcedureStatusStatement) parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toMySqlString(show);
        Assert.assertEquals("SHOW PROCEDURE STATUS WHERE 1 = 1", output);
    }
   
    public void test_show_procedure_status_2() throws Exception {
View Full Code Here

   
    public void test_show_procedure_status_2() throws Exception {
        String sql = "SHOW procedure status ";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowProcedureStatusStatement show = (MySqlShowProcedureStatusStatement) parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toMySqlString(show);
        Assert.assertEquals("SHOW PROCEDURE STATUS", output);
    }
   
    public void test_show_processList() throws Exception {
View Full Code Here

   
    public void test_show_processList() throws Exception {
        String sql = "SHOW processlist ";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowProcessListStatement show = (MySqlShowProcessListStatement) parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toMySqlString(show);
        Assert.assertEquals("SHOW PROCESSLIST", output);
    }
   
    public void test_show_processList_1() throws Exception {
View Full Code Here

   
    public void test_show_processList_1() throws Exception {
        String sql = "SHOW full processlist ";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowProcessListStatement show = (MySqlShowProcessListStatement) parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toMySqlString(show);
        Assert.assertEquals("SHOW FULL PROCESSLIST", output);
    }

   
View Full Code Here

   
    public void test_show_profiles() throws Exception {
        String sql = "SHOW profiles";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowProfilesStatement show = (MySqlShowProfilesStatement) parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toMySqlString(show);
        Assert.assertEquals("SHOW PROFILES", output);
    }
   
   
View Full Code Here

   
    public void test_show_profile() throws Exception {
        String sql = "SHOW profile";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowProfileStatement show = (MySqlShowProfileStatement) parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toMySqlString(show);
        Assert.assertEquals("SHOW PROFILE", output);
    }
   
    public void test_show_profile_1() throws Exception {
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.