package ink.wgink.database.dao.mysql;

import ink.wgink.database.pojo.bos.mysql.MysqlBO;
import ink.wgink.database.pojo.dtos.mysql.MysqlDTO;
import ink.wgink.database.pojo.pos.mysql.MysqlPO;
import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.exceptions.UpdateException;
import ink.wgink.interfaces.init.IInitBaseTable;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: IMysqlDao
 * @Description: mysql连接
 * @Author: CodeFactory
 * @Date: 2021-10-26 23:05:32
 * @Version: 3.0
 **/
@Repository
public interface IMysqlDao extends IInitBaseTable {

    /**
     * 新增mysql连接
     *
     * @param params
     * @throws SaveException
     */
    void save(Map<String, Object> params) throws SaveException;

    /**
     * 删除mysql连接
     *
     * @param params
     * @throws RemoveException
     */
    void remove(Map<String, Object> params) throws RemoveException;

    /**
     * 删除mysql连接（物理）
     *
     * @param params
     * @throws RemoveException
     */
    void delete(Map<String, Object> params) throws RemoveException;

    /**
     * 修改mysql连接
     *
     * @param params
     * @throws UpdateException
     */
    void update(Map<String, Object> params) throws UpdateException;

    /**
     * mysql连接详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    MysqlDTO get(Map<String, Object> params) throws SearchException;

    /**
     * mysql连接详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    MysqlBO getBO(Map<String, Object> params) throws SearchException;

    /**
     * mysql连接详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    MysqlPO getPO(Map<String, Object> params) throws SearchException;

    /**
     * mysql连接列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<MysqlDTO> list(Map<String, Object> params) throws SearchException;

    /**
     * mysql连接列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<MysqlBO> listBO(Map<String, Object> params) throws SearchException;

    /**
     * mysql连接列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<MysqlPO> listPO(Map<String, Object> params) throws SearchException;

    /**
     * mysql连接统计
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer count(Map<String, Object> params) throws SearchException;

}