Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/main/resources/mybatis/tool/GenTableColumnMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(case when temp.constraint_type = 'P' then '1' else '0' end) as is_increment,
lower(temp.data_type) as column_type
from (
select col.column_id, col.column_name,col.nullable, col.data_type, colc.comments, uc.constraint_type
, row_number() over (partition by col.column_name order by uc.constraint_type desc) as row_flg
select col.column_id, col.column_name,col.nullable, colc.comments, uc.constraint_type
, row_number() over (partition by col.column_name order by uc.constraint_type desc) as row_flg,
(col.data_type || '(' || nvl(col.data_precision, col.data_length) ||
(case when nvl(col.data_scale, 0) > 0 then ',' || col.data_scale end) || ')') data_type
from user_tab_columns col
left join user_col_comments colc on colc.table_name = col.table_name and colc.column_name = col.column_name
left join user_cons_columns ucc on ucc.table_name = col.table_name and ucc.column_name = col.column_name
Expand Down Expand Up @@ -144,4 +146,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>

</mapper>
</mapper>