bug fixed for sql schema resolve. for issue #2264

This commit is contained in:
wenshao
2018-02-04 15:44:51 +08:00
parent 1b1e1140c7
commit ce30557f8a
2 changed files with 17 additions and 6 deletions
@@ -21,14 +21,13 @@ public class OracleJoinResolveTest_2_join extends TestCase {
}
public void test_for_issue() throws Exception {
String sql = "select a.* from t_user a inner join t_group b where a.uid = id";
assertEquals("SELECT a.uid, a.gid, a.name, b.id, a.name\n" +
assertEquals("SELECT a.uid, a.gid, a.name, b.id, b.name\n" +
"FROM t_user a\n" +
"\tINNER JOIN t_group b\n" +
"WHERE a.uid = b.id"
, repository.resolve("select * from t_user a inner join t_group b where a.uid = id"));
String sql = "select a.* from t_user a inner join t_group b where a.uid = id";
List<SQLStatement> statementList = SQLUtils.parseStatements(sql, JdbcConstants.ORACLE);
SchemaStatVisitor schemaStatVisitor = SQLUtils.createSchemaStatVisitor(JdbcConstants.ORACLE);
schemaStatVisitor.setRepository(repository);