package cn.datax.service.data.factory.service;

import cn.datax.common.database.DbQuery;
import cn.datax.common.database.core.DbColumn;
import cn.datax.common.database.core.DbTable;
import cn.datax.service.data.factory.api.dto.DataSourceDto;
import cn.datax.service.data.factory.api.entity.DataSourceEntity;
import cn.datax.common.base.BaseService;

import java.util.List;

/**
 * <p>
 * 数据源信息表 服务类
 * </p>
 *
 * @author yuwei
 * @since 2020-03-14
 */
public interface DataSourceService extends BaseService<DataSourceEntity> {

    void saveDataSource(DataSourceDto dataSource);

    void updateDataSource(DataSourceDto dataSource);

    DataSourceEntity getDataSourceById(String id);

    void deleteDataSourceById(String id);

    void deleteDataSourceBatch(List<String> ids);

    DbQuery checkConnection(DataSourceDto dataSource);

    DbQuery getDbQuery(String id);

    List<DbTable> getDbTables(String id);

    List<DbColumn> getDbTableColumns(String id, String tableName);
}
