增强支持CONNECT

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@131 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-05-19 02:34:44 +00:00
parent 39067f1133
commit 6311c67f54
6 changed files with 127 additions and 2 deletions
@@ -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();