mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
增强支持CONNECT
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@131 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -50,6 +50,18 @@ public class OracleSQLParserTest extends TestCase {
|
||||
String text = output(statementList);
|
||||
System.out.println(text);
|
||||
}
|
||||
|
||||
public void test_2() throws Exception {
|
||||
String sql = "SELECT LPAD(' ',2*(LEVEL-1)) || last_name org_chart, employee_id, manager_id, job_id FROM employees WHERE job_id != 'FI_MGR' START WITH job_id = 'AD_VP' CONNECT BY PRIOR employee_id = manager_id; ";
|
||||
|
||||
OracleStatementParser parser = new OracleStatementParser(sql);
|
||||
List<SQLStatement> statementList = parser.parseStatementList();
|
||||
|
||||
Assert.assertEquals(1, statementList.size());
|
||||
|
||||
String text = output(statementList);
|
||||
System.out.println(text);
|
||||
}
|
||||
|
||||
private String output(List<SQLStatement> stmtList) {
|
||||
StringBuilder out = new StringBuilder();
|
||||
|
||||
Reference in New Issue
Block a user