29 lines
885 B
XML
29 lines
885 B
XML
<?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.ruoyi.bps.mapper.TopgpDdlMapper">
|
|
|
|
<update id="alterTableName">
|
|
alter table ${originalTableName} rename ${newTableName}
|
|
</update>
|
|
|
|
<update id="truncateTable">
|
|
truncate table ${tableName}
|
|
</update>
|
|
|
|
<update id="dropTable">
|
|
drop table ${tableName}
|
|
</update>
|
|
|
|
<update id="copyTable">
|
|
create table ${newTableName} as select * from ${originalTableName}
|
|
</update>
|
|
|
|
<select id="getRecordCount" resultType="int">
|
|
select count(1) from ${tableName}
|
|
</select>
|
|
|
|
<select id="isTableInDb" resultType="int">
|
|
SELECT COUNT(*) FROM ALL_TABLES WHERE OWNER = UPPER(#{dataBaseName}) AND TABLE_NAME = UPPER(#{tableName})
|
|
</select>
|
|
|
|
</mapper> |