修改SQL兼容Oracle和Pgsql
This commit is contained in:
parent
8141aa72e8
commit
3ec5dfd113
|
|
@ -14,13 +14,24 @@
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="containSampleId" resultType="org.jeecg.modules.base.dto.OwnerDto">
|
<select id="containSampleId" resultType="org.jeecg.modules.base.dto.OwnerDto">
|
||||||
SELECT
|
<if test="_databaseId == 'oracle'">
|
||||||
|
SELECT
|
||||||
OWNER,
|
OWNER,
|
||||||
TABLE_NAME AS tableName
|
TABLE_NAME AS tableName
|
||||||
FROM
|
FROM
|
||||||
DBA_TAB_COLUMNS
|
DBA_TAB_COLUMNS
|
||||||
WHERE
|
WHERE
|
||||||
COLUMN_NAME = #{filed}
|
UPPER(COLUMN_NAME) = UPPER(#{filed})
|
||||||
|
</if>
|
||||||
|
<if test="_databaseId == 'postgresql'">
|
||||||
|
SELECT
|
||||||
|
table_schema AS owner,
|
||||||
|
table_name AS tablename
|
||||||
|
FROM
|
||||||
|
information_schema.columns
|
||||||
|
WHERE
|
||||||
|
UPPER(column_name) = UPPER(#{filed})
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getAnalysis" resultType="org.jeecg.modules.base.dto.AnalysesDto">
|
<select id="getAnalysis" resultType="org.jeecg.modules.base.dto.AnalysesDto">
|
||||||
Loading…
Reference in New Issue
Block a user