Skip to content

Commit

Permalink
Merge pull request #186 from lanjerry/develop
Browse files Browse the repository at this point in the history
refactor: 兼容 Oracle 11版本的字段查询sql.
  • Loading branch information
qmdx authored Feb 25, 2022
2 parents cb05519 + 80ea441 commit be76ea8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ public String tableFieldsSql(String tableName) {
if (DbType.KINGBASE_ES == dbType || DbType.DB2 == dbType) {
tableFieldsSql = String.format(tableFieldsSql, this.schema, tableName);
} else if (DbType.ORACLE == dbType) {
tableName = tableName.toUpperCase();
tableFieldsSql = String.format(tableFieldsSql.replace("#schema", this.schema), tableName);
tableFieldsSql = String.format(tableFieldsSql.replace("#schema", this.schema), tableName, tableName.toUpperCase());
} else if (DbType.DM == dbType) {
tableName = tableName.toUpperCase();
tableFieldsSql = String.format(tableFieldsSql, tableName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public String tableFieldsSql() {
+ " INNER JOIN ALL_COL_COMMENTS B ON A.TABLE_NAME = B.TABLE_NAME AND A.COLUMN_NAME = B.COLUMN_NAME AND B.OWNER = '#schema'"
+ " LEFT JOIN ALL_CONSTRAINTS D ON D.TABLE_NAME = A.TABLE_NAME AND D.CONSTRAINT_TYPE = 'P' AND D.OWNER = '#schema'"
+ " LEFT JOIN ALL_CONS_COLUMNS C ON C.CONSTRAINT_NAME = D.CONSTRAINT_NAME AND C.COLUMN_NAME=A.COLUMN_NAME AND C.OWNER = '#schema'"
+ "WHERE A.OWNER = '#schema' AND A.TABLE_NAME = '%s' ORDER BY A.COLUMN_ID ";
+ "WHERE A.OWNER = '#schema' AND (A.TABLE_NAME = '%s' OR A.TABLE_NAME = '%s') ORDER BY A.COLUMN_ID ";
}


Expand Down

0 comments on commit be76ea8

Please sign in to comment.