use of com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowGrantsStatement in project druid by alibaba.
the class DALParserTest method test_show_grants_3.
public void test_show_grants_3() throws Exception {
String sql = "SHOW GRANTS FOR CURRENT_USER()";
MySqlStatementParser parser = new MySqlStatementParser(sql);
MySqlShowGrantsStatement show = (MySqlShowGrantsStatement) parser.parseStatementList().get(0);
parser.match(Token.EOF);
String output = SQLUtils.toMySqlString(show);
Assert.assertEquals("SHOW GRANTS FOR CURRENT_USER()", output);
}
use of com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowGrantsStatement in project druid by alibaba.
the class DALParserTest method test_show_grants_1.
public void test_show_grants_1() throws Exception {
String sql = "SHOW GRANTS";
MySqlStatementParser parser = new MySqlStatementParser(sql);
MySqlShowGrantsStatement show = (MySqlShowGrantsStatement) parser.parseStatementList().get(0);
parser.match(Token.EOF);
String output = SQLUtils.toMySqlString(show);
Assert.assertEquals("SHOW GRANTS", output);
}
Aggregations