mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for sql schema resolve. for issue #2264
This commit is contained in:
+2
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user