use of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser in project druid by alibaba.
the class DALParserTest method test_show_events_2.
public void test_show_events_2() throws Exception {
String sql = "SHOW EVENTS in x";
MySqlStatementParser parser = new MySqlStatementParser(sql);
MySqlShowEventsStatement show = (MySqlShowEventsStatement) parser.parseStatementList().get(0);
parser.match(Token.EOF);
String output = SQLUtils.toMySqlString(show);
Assert.assertEquals("SHOW EVENTS FROM x", output);
}
use of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser in project druid by alibaba.
the class DALParserTest method test_show_engine_2.
public void test_show_engine_2() throws Exception {
String sql = "SHOW ENGINE INNODB mutex";
MySqlStatementParser parser = new MySqlStatementParser(sql);
MySqlShowEngineStatement show = (MySqlShowEngineStatement) parser.parseStatementList().get(0);
parser.match(Token.EOF);
String output = SQLUtils.toMySqlString(show);
Assert.assertEquals("SHOW ENGINE INNODB MUTEX", output);
}
use of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser in project druid by alibaba.
the class DALParserTest method test_show_create_table.
public void test_show_create_table() throws Exception {
String sql = "SHOW CREATE table x";
MySqlStatementParser parser = new MySqlStatementParser(sql);
MySqlShowCreateTableStatement show = (MySqlShowCreateTableStatement) parser.parseStatementList().get(0);
parser.match(Token.EOF);
String output = SQLUtils.toMySqlString(show);
Assert.assertEquals("SHOW CREATE TABLE x", output);
}
use of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser in project druid by alibaba.
the class DALParserTest method test_show_binaryLogs.
public void test_show_binaryLogs() throws Exception {
String sql = "SHOW BINARY LOGS ";
MySqlStatementParser parser = new MySqlStatementParser(sql);
MySqlShowBinaryLogsStatement show = (MySqlShowBinaryLogsStatement) parser.parseStatementList().get(0);
parser.match(Token.EOF);
String output = SQLUtils.toMySqlString(show);
Assert.assertEquals("SHOW BINARY LOGS", output);
}
use of com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser in project druid by alibaba.
the class DALParserTest method test_show_events_1.
public void test_show_events_1() throws Exception {
String sql = "SHOW EVENTS from x";
MySqlStatementParser parser = new MySqlStatementParser(sql);
MySqlShowEventsStatement show = (MySqlShowEventsStatement) parser.parseStatementList().get(0);
parser.match(Token.EOF);
String output = SQLUtils.toMySqlString(show);
Assert.assertEquals("SHOW EVENTS FROM x", output);
}
Aggregations