
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<?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">
<!--
작성자 : 최정우
작성일 : 2019.11.17
내용 : PostgreSQL 접속 모듈에 관련된 SQL입니다.
-->
<mapper namespace="PostgresqlDAO">
<!--
작성자 : 최정우
작성일 : 2020.01.27
내용 : 커넥션된 데이터베이스의 테이블 목록 조회 SQL입니다.
-->
<select id="getDBConnectionTableList" parameterType="ConnectionDB" resultType="Dataset">
SELECT t.schemaname AS "databaseNm"
, t.tablename AS "tableNm"
, obj_description(c.oid) AS "tableNmKr"
FROM pg_catalog.pg_tables t
JOIN pg_catalog.pg_class c
ON c.relname = t.tablename
JOIN pg_catalog.pg_namespace n
ON c.relnamespace = n.oid
WHERE t.schemaname = #{databaseNm}
AND n.nspname = t.schemaname
ORDER BY t.tablename ASC
</select>
<!--
작성자 : 최정우
작성일 : 2020.01.27
내용 : 커넥션된 데이터베이스의 테이블의 컬럼 정보 조회 (DB 기준 데이터 타입, 데이터 크기 등)
-->
<select id="getDBConnectionTableColumnList" parameterType="Dataset" resultType="ColumnData">
WITH keys AS (
SELECT
tc.table_schema,
tc.table_name,
kcu.column_name,
tc.constraint_type
FROM
information_schema.table_constraints AS tc
JOIN
information_schema.key_column_usage AS kcu
ON tc.constraint_name = kcu.constraint_name AND tc.table_schema = kcu.table_schema
WHERE
tc.table_schema = #{databaseNm}
AND
tc.table_name = #{tableNm}
)
SELECT
c.table_schema AS databaseNm,
c.table_name AS tableNm,
c.column_name AS columnNm,
c.column_name AS displyColumnNm,
c.column_name AS orginlColumnNm,
c.data_type AS dbDataType,
c.character_maximum_length AS dataSize,
c.ordinal_position AS ordr,
MAX(CASE WHEN k.constraint_type = 'PRIMARY KEY' THEN 1 ELSE 0 END) > 0 AS "pkAt",
MAX(CASE WHEN k.constraint_type = 'UNIQUE' THEN 1 ELSE 0 END) > 0 AS "uniqeAt"
FROM
information_schema.columns AS c
LEFT JOIN
keys AS k ON c.table_schema = k.table_schema AND c.table_name = k.table_name AND c.column_name = k.column_name
WHERE
c.table_schema = #{databaseNm}
AND
c.table_name = #{tableNm}
GROUP BY
c.table_schema, c.table_name, c.column_name, c.data_type, c.character_maximum_length, c.ordinal_position
ORDER BY
c.ordinal_position;
</select>
<!--
작성자: 최정우
작성일: 2020.01.27
내용: 커넥션된 데이터베이스의 테이블의 데이터 목록 조회 SQL입니다.(페이징)
-->
<select id="getDBConnectionTableDataList" parameterType="DataTable" resultType="java.util.LinkedHashMap">
SELECT
*
FROM
${databaseNm}.${tableNm}
WHERE 1 = 1
<!-- 검색 -->
<choose>
<!-- 컬럼 데이터 목록이 존재하고, 검색 조건이 없고, 검색 키워드가 있을 때 -->
<when test="columnDatas != null and columnDatas.size() > 0 and (searchCondition == null or searchCondition == '') and searchKeyword != null and searchKeyword != ''">
AND
<foreach item="item" index="index" collection="columnDatas" open="(" separator=" OR " close=")">
<foreach item="keyword" index="index2" collection="searchKeywordList" separator=" OR ">
${item.columnNm} LIKE CONCAT('%', #{keyword}, '%')
</foreach>
</foreach>
</when>
<!-- //컬럼 데이터 목록이 존재하고, 검색 조건이 없고, 검색 키워드가 있을 때 -->
<!-- 컬럼 데이터 목록이 존재하지 않거나, 검색 조건이 있거나, 검색 키워드가 있을 때 -->
<otherwise>
<if test="searchCondition != null and searchCondition != '' and searchKeyword != null and searchKeyword != ''">
AND
<foreach item="keyword" index="index2" collection="searchKeywordList" open="(" separator=" OR " close=")">
${searchCondition} LIKE CONCAT('%', #{keyword}, '%')
</foreach>
</if>
</otherwise>
<!-- //컬럼 데이터 목록이 존재하지 않거나, 검색 조건이 있거나, 검색 키워드가 있을 때 -->
</choose>
<!-- //검색 -->
<!-- 정렬 -->
<if test="order != null and order != ''">
ORDER BY ${order}
<choose>
<!-- 오름차순일 때 -->
<when test="isOrderASC == true">
ASC
</when>
<!-- //오름차순일 때 -->
<!-- 내림차순일 때 -->
<otherwise>
DESC
</otherwise>
<!-- 내림차순일 때 -->
</choose>
) AS NUM
</if>
<!-- //정렬 -->
<if test="isUsePaging == true">
LIMIT #{perPage} OFFSET #{startIndex}
</if>
</select>
<!--
작성자: 최정우
작성일: 2020.01.27
내용: 커넥션된 데이터베이스의 테이블의 데이터 목록 총 갯수 조회 SQL입니다.
-->
<select id="getDBConnectionTableDataTotalRows" parameterType="DataTable" resultType="java.lang.Integer">
SELECT
COUNT(0)
FROM
${databaseNm}.${tableNm}
WHERE 1 = 1
<!-- 검색 -->
<choose>
<!-- 컬럼 데이터 목록이 존재하고, 검색 조건이 없고, 검색 키워드가 있을 때 -->
<when test="columnDatas != null and columnDatas.size() > 0 and (searchCondition == null or searchCondition == '') and searchKeyword != null and searchKeyword != ''">
AND
<foreach item="item" index="index" collection="columnDatas" open="(" separator=" OR " close=")">
<foreach item="keyword" index="index2" collection="searchKeywordList" separator=" OR ">
${item.columnNm} LIKE CONCAT('%', #{keyword}, '%')
</foreach>
</foreach>
</when>
<!-- //컬럼 데이터 목록이 존재하고, 검색 조건이 없고, 검색 키워드가 있을 때 -->
<!-- 컬럼 데이터 목록이 존재하지 않거나, 검색 조건이 있거나, 검색 키워드가 있을 때 -->
<otherwise>
<if test="searchCondition != null and searchCondition != '' and searchKeyword != null and searchKeyword != ''">
AND
<foreach item="keyword" index="index2" collection="searchKeywordList" open="(" separator=" OR " close=")">
${searchCondition} LIKE CONCAT('%', #{keyword}, '%')
</foreach>
</if>
</otherwise>
<!-- //컬럼 데이터 목록이 존재하지 않거나, 검색 조건이 있거나, 검색 키워드가 있을 때 -->
</choose>
<!-- //검색 -->
</select>
<!--
작성자: 최정우
작성일: 2020.01.27
내용: 커스텀 테이블 데이터 조회 (페이징사용 유무에 따라 페이징 처리) SQL입니다.
-->
<select id="getDBConnectionCustomQueryDataList" parameterType="DataTable" resultType="java.util.LinkedHashMap">
SELECT
a.*
FROM (
${query}
) a
<if test="limit > 0">
LIMIT #{limit}
</if>
</select>
<!--
작성자: 최정우
작성일: 2020.01.27
내용: 커스텀 테이블 실행형
-->
<update id="executeCustomQuery" parameterType="DataTable">
/*+ RULE */
${query}
</update>
<!--
작성자: 최정우
작성일: 2020.01.27
내용: 커스텀 테이블 데이터 목록 총 갯수 조회 SQL입니다.
-->
<select id="getDBConnectionCustomQueryDataTotalRows" parameterType="DataTable" resultType="java.lang.Integer">
SELECT
COUNT(0)
FROM (
${query}
) a
</select>
<!--
작성자: 최정우
작성일: 2020.01.27
내용: DB연계 데이터 목록 조회 (초기 DB화 때에 등록한 컬럼만 가지고 옴)
-->
<select id="getDBCollectionQueryDataList" parameterType="DataTable" resultType="java.util.LinkedHashMap">
SELECT
<foreach item="item" index="index" collection="columnDatas" open="" separator="," close="">
a.${item.OrginlColumnNm} AS '${item.columnNm}'
</foreach>
FROM (
${query}
) a
<!-- 검색 -->
<choose>
<!-- 컬럼 데이터 목록이 존재하고, 검색 조건이 없고, 검색 키워드가 있을 때 -->
<when test="columnDatas != null and columnDatas.size() > 0 and (searchCondition == null or searchCondition == '') and searchKeyword != null and searchKeyword != ''">
AND
<foreach item="item" index="index" collection="columnDatas" open="(" separator=" OR " close=")">
<foreach item="keyword" index="index2" collection="searchKeywordList" separator=" OR ">
a.${item.OrginlColumnNm} LIKE CONCAT('%', #{keyword}, '%')
</foreach>
</foreach>
</when>
<!-- //컬럼 데이터 목록이 존재하고, 검색 조건이 없고, 검색 키워드가 있을 때 -->
<!-- 컬럼 데이터 목록이 존재하지 않거나, 검색 조건이 있거나, 검색 키워드가 있을 때 -->
<otherwise>
<if test="searchCondition != null and searchCondition != '' and searchKeyword != null and searchKeyword != ''">
AND
<foreach item="keyword" index="index2" collection="searchKeywordList" open="(" separator=" OR " close=")">
a.${searchCondition} LIKE CONCAT('%', #{keyword}, '%')
</foreach>
</if>
</otherwise>
<!-- //컬럼 데이터 목록이 존재하지 않거나, 검색 조건이 있거나, 검색 키워드가 있을 때 -->
</choose>
<!-- //검색 -->
<!-- 정렬 -->
<if test="order != null and order != ''">
ORDER BY ${order}
<choose>
<!-- 오름차순일 때 -->
<when test="isOrderASC == true">
ASC
</when>
<!-- //오름차순일 때 -->
<!-- 내림차순일 때 -->
<otherwise>
DESC
</otherwise>
<!-- 내림차순일 때 -->
</choose>
) AS NUM
</if>
<!-- //정렬 -->
<if test="isUsePaging == true">
LIMIT #{perPage} OFFSET #{startIndex}
</if>
</select>
<!--
작성자: 최정우
작성일: 2020.01.27
내용: DB연계 데이터 목록 총 갯수 조회
-->
<select id="getDBCollectionQueryDataTotalRows" parameterType="DataTable" resultType="java.lang.Integer">
SELECT
COUNT(0)
FROM (
${query}
) a
<!-- 검색 -->
<choose>
<!-- 컬럼 데이터 목록이 존재하고, 검색 조건이 없고, 검색 키워드가 있을 때 -->
<when test="columnDatas != null and columnDatas.size() > 0 and (searchCondition == null or searchCondition == '') and searchKeyword != null and searchKeyword != ''">
AND
<foreach item="item" index="index" collection="columnDatas" open="(" separator=" OR " close=")">
<foreach item="keyword" index="index2" collection="searchKeywordList" separator=" OR ">
a.${item.originColumnNm} LIKE CONCAT('%', #{keyword}, '%')
</foreach>
</foreach>
</when>
<!-- //컬럼 데이터 목록이 존재하고, 검색 조건이 없고, 검색 키워드가 있을 때 -->
<!-- 컬럼 데이터 목록이 존재하지 않거나, 검색 조건이 있거나, 검색 키워드가 있을 때 -->
<otherwise>
<if test="searchCondition != null and searchCondition != '' and searchKeyword != null and searchKeyword != ''">
AND
<foreach item="keyword" index="index2" collection="searchKeywordList" open="(" separator=" OR " close=")">
a.${searchCondition} LIKE CONCAT('%', #{keyword}, '%')
</foreach>
</if>
</otherwise>
<!-- //컬럼 데이터 목록이 존재하지 않거나, 검색 조건이 있거나, 검색 키워드가 있을 때 -->
</choose>
<!-- //검색 -->
</select>
<!--
작성자: 최정우
작성일: 2020.11.29
내용: 커트텀 쿼리 지정된 PK의 중복 데이터 수 (지정된 PK로 Table 생성이 가능한지 알아보기 위함)
-->
<select id="getCustomQueryPrimaryOverlapCount" parameterType="DataTable" resultType="java.lang.Integer">
SELECT
IFNULL(SUM(a.overlapCount), 0) AS totalOverlapCount
FROM (
SELECT
COUNT(0) AS overlapCount
FROM (
${query}
) t
GROUP BY
<foreach item="item" index="index" collection="columnData" open="" separator="," close="">
t.${item.columnNm}
</foreach>
HAVING
COUNT(0) > 1
) a
</select>
<!--
작성자 : 김성원
작성일 : 2021.01.17
내용 : 데이터 셋의 DB화 (테이블 생성)
-->
<update id="datasetTableCreate" parameterType="DataTable">
CREATE TABLE ${databaseNm}.${tableNm}(
<foreach item="item" index="index" collection="columnDatas" separator=",">
${item.columnNm} ${item.dbDataType}
<if test="item.dbDataType == 'varchar'">(#{item.dataSize})</if>
<choose>
<when test="item.isPrimary == true"> NOT NULL</when>
<otherwise> DEFAULT NULL</otherwise>
</choose>
</foreach>
, PRIMARY KEY (
<foreach item="item" index="index" collection="columnDatas" separator=",">
<if test="item.isPrimary == true">
${item.columnNm}
</if>
</foreach>
)
<foreach item="item" index="index" collection="columnDatas">
<if test="item.isUniq == true">
, UNIQUE INDEX ${tableNm}_${item.columnNm}_UNIQUE (${item.columnNm} ASC)
</if>
</foreach>
) ;
<if test="datasetSj != null and datasetSj != ''">
COMMENT ON TABLE ${databaseNm}.${tableNm} IS #{datasetSj};
</if>
</update>
<!--
작성자 : 김성원
작성일 : 2021.01.17
내용 : 데이터 셋의 DB화 (테이블 생성)
-->
<update id="datasetDefaultTableCreate" parameterType="DataTable">
CREATE TABLE ${databaseNm}.${tableNm} (
ts_row SERIAL PRIMARY KEY
<foreach item="item" index="index" collection="columnDatas">
<if test="item.dbDataType == 'double'">
, ${item.columnNm} numeric
</if>
<if test="item.dbDataType != 'double'">
, ${item.columnNm} ${item.dbDataType}
</if>
<if test="item.dbDataType == 'varchar'">
(${item.dataSize})
</if>
DEFAULT NULL
</foreach>
<foreach item="item" index="index" collection="columnDatas">
<if test="item.isUniq == true">
, UNIQUE INDEX ${tableNm}_${item.columnNm}_UNIQUE (${item.columnNm} ASC)
</if>
</foreach>
);
<if test="datasetSj != null and datasetSj != ''">
COMMENT ON TABLE ${databaseNm}.${tableNm} IS '${datasetSj}';
</if>
</update>
<!--
작성자 : 김성원
작성일 : 2021.01.17
내용 : 데이터 셋의 DB화 (데이터 생성 및 업데이트)
-->
<update id="datasetDataUpdate" parameterType="DataTable">
INSERT INTO ${databaseNm}.${tableNm}
<foreach item="item" index="index" collection="columnDatas" open="(" separator="," close=")">
<choose>
<when test="item.columnNm == 'ts_row'">
"${item.columnNm}"
</when>
<otherwise>
${item.columnNm}
</otherwise>
</choose>
</foreach>
VALUES
<foreach item="row" collection="rowData" separator=",">
(
<foreach item="cell" index="index" collection="row" separator=",">
<choose>
<when test="columnDatas[index].pkAt == true and (cell == '' or cell == null)">
DEFAULT
</when>
<otherwise>
<choose>
<!-- 숫자형 타입 - 문자열을 숫자로 캐스팅 처리 -->
<when test="columnDatas[index].dbDataType == 'bigint' or columnDatas[index].dbDataType == 'int' or columnDatas[index].dbDataType == 'integer'">
<choose>
<when test="cell == null or cell == ''">
NULL
</when>
<otherwise>
CAST(#{cell} AS ${columnDatas[index].dbDataType})
</otherwise>
</choose>
</when>
<!-- 날짜/시간 타입 - 문자열을 타임스탬프로 캐스팅 처리 -->
<when test="columnDatas[index].dbDataType == 'date' or columnDatas[index].dbDataType == 'timestamp' or columnDatas[index].dbDataType == 'timestamptz' or columnDatas[index].dbDataType == 'datetime'">
<choose>
<when test="cell == null or cell == ''">
NULL
</when>
<otherwise>
CAST(#{cell} AS timestamp)
</otherwise>
</choose>
</when>
<!-- 문자열 타입 -->
<when test="columnDatas[index].dbDataType == 'varchar' or columnDatas[index].dbDataType == 'text' or columnDatas[index].dbDataType == 'char'">
<choose>
<when test="cell == null or cell == ''">
NULL
</when>
<otherwise>
#{cell, jdbcType=VARCHAR}
</otherwise>
</choose>
</when>
<!-- 기본 바인딩 -->
<otherwise>
<choose>
<when test="cell == null or cell == ''">
NULL
</when>
<otherwise>
<if test="columnDatas[index].dbDataType != null">
CAST(#{cell} AS ${columnDatas[index].dbDataType})
</if>
<if test="columnDatas[index].dbDataType == null">
#{cell}
</if>
</otherwise>
</choose>
</otherwise>
</choose>
</otherwise>
</choose>
</foreach>
)
</foreach>
ON CONFLICT ON CONSTRAINT ${tableNm}_pkey
DO UPDATE SET
<foreach item="item" index="index" collection="columnDatas" separator=",">
<if test="columnDatas[index].pkAt != null and columnDatas[index].pkAt == false">
<choose>
<when test="item.columnNm == 'ts_row'">
"${item.columnNm}" = EXCLUDED."${item.columnNm}"
</when>
<otherwise>
${item.columnNm} = EXCLUDED.${item.columnNm}
</otherwise>
</choose>
</if>
</foreach>
</update>
<!--
작성자 : 김성원
작성일 : 2021.01.17
내용 : 데이터 셋의 ROW 삭제
-->
<update id="datasetDataDelete" parameterType="DataTable">
DELETE FROM ${databaseNm}.${tableNm}
WHERE
1 = 1
<foreach item="item" index="index" collection="columnDatas" open=" AND " separator=" AND " close="">
${item.columnNm} in
<foreach item="items" index="indexs" collection="item.values" open="(" separator=", " close=")">
#{items}
</foreach>
</foreach>
</update>
<!--
작성자 : 김성원
작성일 : 2021.01.17
내용 : 중복 테이블명 체크
-->
<select id="duplicateChecktableNm" parameterType="Map" resultType="INTEGER">
SELECT count(*)
FROM
Information_schema.tables
WHERE
table_catalog = #{schemaNm}
AND
TABLE_NAME = #{tableNm}
</select>
<!--
작성자 : 김성원
작성일 : 2021.01.17
내용: 데이터 셋의 컬럼 정보 목록 조회 SQL에 접근하는 메소드 입니다.(페이징)
-->
<select id="getRowData" parameterType="DataTable" resultType="java.util.LinkedHashMap">
SELECT
<foreach item="item" index="index" collection="columnDatas" open="" separator="," close="">
${item.columnNm}
</foreach>
FROM
${databaseNm}.${tableNm}
WHERE true
<!-- 검색 -->
<if test="searchCondition != null and searchCondition != '' and searchKeyword != null and searchKeyword != ''">
AND
${searchCondition} LIKE CONCAT('%', #{searchKeyword}, '%')
</if>
<!-- //검색 -->
<!-- 정렬 -->
<if test="order != null and order != ''">
ORDER BY ${order}
<choose>
<!-- 오름차순일 때 -->
<when test="isOrderASC == true">
ASC
</when>
<!-- //오름차순일 때 -->
<!-- 내림차순일 때 -->
<otherwise>
DESC
</otherwise>
<!-- 내림차순일 때 -->
</choose>
) AS NUM
</if>
<!-- //정렬 -->
LIMIT #{perPage} OFFSET ((#{currentPage} - 1) * #{perPage})
</select>
<!--
작성자: 김성원
작성일: 2022.01.17
내용: 데이터 셋의 컬럼 정보 목록 조회 SQL에 접근하는 메소드 입니다.(노페이징)
-->
<select id="getRowDataAll" parameterType="DataTable" resultType="java.util.LinkedHashMap">
SELECT
<foreach item="item" index="index" collection="columnDatas" open="" separator="," close="">
${item.columnNm} AS ${item.displyColumnNm}
</foreach>
FROM
${databaseNm}.${tableNm}
<if test="query != null and query != ''">
WHERE 1 = 1
<!-- AND -->
${query}
</if>
<if test="offset != null and offset > 0">
LIMIT #{perPage} OFFSET #{offset}
</if>
</select>
<!--
작성자: 김성원
작성일: 2022.01.17
내용: 데이터 셋의 컬럼 정보 목록 총 갯수 조회 SQL
-->
<select id="getRowDataTotalRows" parameterType="DataTable" resultType="java.lang.Integer">
SELECT
COUNT(0)
FROM
${databaseNm}.${tableNm}
WHERE 1=1
<if test="searchCondition != null and searchCondition != '' and searchKeyword != null and searchKeyword != ''">
AND
${searchCondition} LIKE CONCAT('%', #{searchKeyword}, '%')
</if>
</select>
<!--
작성자: 김성원
작성일: 2022.01.17
내용 : 데이터 셋의 비우기 (데이터 셋 내용삭제)
-->
<delete id="emptyDataset" parameterType="DataTable">
DELETE FROM ${databaseNm}.${tableNm}
</delete>
<!--
작성자 : 김성원
작성일 : 2022.01.20
내용 : 실제 생성된 컬럼 변경
-->
<update id="tableColumnChange" parameterType="TableBasicInfo">
<if test="process == 'RENAME'">
ALTER TABLE ${databaseName}.${tableName} RENAME COLUMN ${columnName} TO ${tobeColumnName}
</if>
<if test="process == 'ADD'">
ALTER TABLE ${databaseName}.${tableName} ADD COLUMN ${columnName}
<choose>
<when test="dataType == 'datetime'">timestamp</when>
<otherwise>${dataType}<if test="dataType == 'varchar'">(${size})</if></otherwise>
</choose>
</if>
<if test="process == 'MODIFY'">
<!-- 임시 컬럼 생성 -->
ALTER TABLE ${databaseName}.${tableName} ADD COLUMN temp_${columnName}
<choose>
<when test="dataType == 'datetime'">timestamp</when>
<otherwise>${dataType}<if test="dataType == 'varchar'">(${size})</if></otherwise>
</choose>;
<!-- 데이터 복사 -->
UPDATE ${databaseName}.${tableName} SET temp_${columnName} = ${columnName}::
<choose>
<when test="dataType == 'datetime'">timestamp</when>
<otherwise>${dataType}<if test="dataType == 'varchar'">(${size})</if></otherwise>
</choose>;
<!-- 기존 컬럼 삭제 -->
ALTER TABLE ${databaseName}.${tableName} DROP COLUMN ${columnName};
<!-- 임시 컬럼 이름 변경 -->
ALTER TABLE ${databaseName}.${tableName} RENAME COLUMN temp_${columnName} TO ${columnName}
</if>
<if test="process == 'DROP'">
ALTER TABLE ${databaseName}.${tableName} DROP COLUMN ${columnName}
</if>
</update>
<!--
작성자 : 김성원
작성일 : 2022.01.20
내용 : 실제 생성된 테이블 PK처리
-->
<update id="changePromaryKey" parameterType="TableBasicInfo">
ALTER TABLE ${tableName} ${process} PRIMARY KEY
<if test="process != 'DROP'">
<foreach item="item" index="index" collection="primaryList" open=" (" separator=", " close=")">
${item}
</foreach>
</if>
</update>
<!--
작성자 : 김성원
작성일 : 2022.01.20
내용 : AI PK 생성
-->
<update id="createAutoIncrement" parameterType="TableBasicInfo">
ALTER TABLE ${tableName} ADD ${columnName}
BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST
</update>
<!--
작성자 : 김혜민
작성일 : 2022.09.30
내용 : 테이블 메타정보 변경 (comments)
-->
<update id="updateTableMetaInfo" parameterType="DataTable">
COMMENT ON TABLE ${tableNm} IS #{datasetSj}
<!-- ALTER TABLE ${tableNm} -->
<!-- COMMENT = #{title} -->
</update>
<!--
작성자 : 박민혁
작성일 : 2024.05.02
내용 : 중복 테이블명 체크
-->
<select id="duplicateCheckTableName" parameterType="Map" resultType="Integer">
SELECT count(*)
FROM
Information_schema.tables
WHERE
table_catalog = #{schema}
AND
TABLE_NAME = #{tableName}
</select>
</mapper>