package com.keyware.shandan.datasource.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.keyware.shandan.datasource.entity.DBDriverVo;
import com.keyware.shandan.datasource.enums.ConnType;
import com.keyware.shandan.datasource.exception.DBDriverException;
import org.springframework.web.multipart.MultipartFile;

/**
 * DBDriverService
 *
 * @author Administrator
 * @since 2021/7/28
 */
public interface DBDriverService extends IService<DBDriverVo> {

    /**
     * 上传驱动
     *
     * @param file 驱动文件
     * @return -
     */
    DBDriverVo upload(MultipartFile file) throws DBDriverException;

    /**
     * 根据驱动ID加载驱动
     *
     * @param driverId 驱动ID
     */
    void loadDriverJarById(String driverId) throws DBDriverException;

    /**
     * 卸载指定驱动
     * @param driverId
     */
    void unLoadDriver(String driverId);
}
