package egovframework.com.mtdata.comtrls.mapper;

import egovframework.com.mtdata.comtrls.vo.ComtrlsColVO;
import egovframework.com.mtdata.comtrls.vo.ComtrlsMetaDataVO;
import egovframework.com.mtdata.comtrls.vo.ComtrlsSrcdataVO;
import egovframework.com.mtdata.comtsrcdata.vo.ComtExtrtVO;
import egovframework.com.mtdata.comtsrcdata.vo.ComtsrcdataVO;
import org.apache.ibatis.annotations.Select;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;

import java.util.Map;

import java.util.List;

@Mapper("ComtrlsdataMapper")
public interface ComtrlsdataMapper {
    /**
     * 공유데이터의 메타데이터를 [comtrlstrgtmetadata] 테이블에 저장
     *
     * @param vo
     * @return
     * @throws Exception
     */
    public int insertComtrlsMetadataInfo(ComtrlsMetaDataVO vo) throws Exception;

    /**
     * 공유데이터의 메타데이터 리스트 조회
     *
     * @param vo
     * @return
     * @throws Exception
     */
    List<ComtrlsMetaDataVO> selectComtrlsMetaDataList(ComtrlsMetaDataVO vo);

    /**
     * 공유데이터의 메타데이터 정보 조회
     *
     * @param vo
     * @return
     * @throws Exception
     */
    ComtrlsMetaDataVO selectComtrlsMetaDataInfo(ComtrlsMetaDataVO vo);

    /**
     * 공유데이터의 테이블의 컬럼 정보 조회
     *
     * @param vo
     * @return
     * @throws Exception
     */
    @Select("SELECT * FROM comtrlsdatacol WHERE rls_data_id = #{rlsDataId})")
    ComtrlsColVO selectComtrlsCol(ComtrlsColVO vo);

    /**
     * [comtrlSrcData]테이블 조회
     *
     * @param vo
     * @return vo
     * @throws Exception
     */
    List<ComtrlsSrcdataVO> selectComtrlsSrcData(ComtrlsSrcdataVO vo);

    /**
     * 공유데이터 컬럼정보 삭제
     *
     * @param param
     * @return
     * @throws Exception
     */
    int deleteComtrlsCol(Map<String, Object> param) throws Exception;


    /**
     * 공유데이터 데이터 내에서 컬럼 삭제
     *
     * @param param
     * @return
     * @throws Exception
     */
    int deleteComtrlsData(Map<String, Object> param) throws Exception;


}
