use of com.alibaba.druid.sql.dialect.mysql.parser.MySqlSelectParser in project druid by alibaba.
the class SQLParserTest method test_select.
public void test_select() throws Exception {
String sql = " SELECT COUNT(*) FROM close_plan WHERE 1=1 AND close_type = ? AND target_type = ? AND target_id = ? AND( mi_name=? ) AND end_time >= ? ";
SQLSelectParser parser = new MySqlSelectParser(sql);
SQLSelect select = parser.select();
StringBuilder out = new StringBuilder();
MySql2OracleOutputVisitor visitor = new MySql2OracleOutputVisitor(out);
select.accept(visitor);
System.out.println(out);
}
Aggregations