mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-10 21:19:00 +08:00
✨ Introducing new features. #2151 【代码生成】 支持ORACEL / SQL SERVER /PG/DB2 等其他数据源类型代码生成
This commit is contained in:
1 parent
afe07e9d56
commit
fc6fefd224
6 files changed
+91
-4
No files matched your search
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.pig4cloud.pigx.codegen.mapper.GeneratorDB2Mapper">
|
||||
|
||||
<select id="queryTable" resultType="map">
|
||||
SELECT
|
||||
'db2' AS "dbType",
|
||||
TABNAME AS "tableName",
|
||||
REMARKS AS "tableComment",
|
||||
CREATE_TIME AS "createTime"
|
||||
FROM syscat.TABLES
|
||||
WHERE TABSCHEMA = (SELECT CURRENT_SCHEMA
|
||||
FROM SYSIBM.SYSDUMMY1
|
||||
)
|
||||
<if test="tableName != null and tableName.trim() != ''">
|
||||
and TABNAME = #{tableName}
|
||||
</if>
|
||||
ORDER BY CREATE_TIME DESC
|
||||
</select>
|
||||
|
||||
|
||||
<sql id="queryColumn">
|
||||
SELECT 'db2' AS "dbType",
|
||||
COLNAME AS "columnName",
|
||||
TYPENAME AS "dataType",
|
||||
REMARKS AS "comments",
|
||||
TYPENAME AS "columnType"
|
||||
FROM SYSCAT.COLUMNS
|
||||
WHERE TABSCHEMA = (SELECT CURRENT_SCHEMA
|
||||
FROM SYSIBM.SYSDUMMY1
|
||||
)
|
||||
and TABNAME = #{tableName}
|
||||
</sql>
|
||||
|
||||
<select id="selectTableColumn" resultType="com.pig4cloud.pigx.codegen.entity.ColumnEntity">
|
||||
<include refid="queryColumn"/>
|
||||
</select>
|
||||
|
||||
<select id="selectMapTableColumn" resultType="map">
|
||||
<include refid="queryColumn"/>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.pig4cloud.pigx.codegen.mapper.GeneratorMySqlMapper">
|
||||
<mapper namespace="com.pig4cloud.pigx.codegen.mapper.GeneratorMysqlMapper">
|
||||
|
||||
<select id="queryTable" resultType="map">
|
||||
SELECT
|
||||
|
||||
Reference in new issue
Block a user