Merge pull request #10409 from dataease/pr@dev-v2@pref_ds

pref: 数据源接口
This commit is contained in:
Junjun 2024-06-20 15:44:17 +08:00 committed by GitHub
commit bfb2e1ea4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,28 @@
package io.dataease.datasource.provider;
import io.dataease.api.dataset.dto.DatasetTableDTO;
import io.dataease.api.ds.vo.TableField;
import io.dataease.datasource.dao.auto.entity.CoreDatasource;
import io.dataease.datasource.request.DatasourceRequest;
import io.dataease.exception.DEException;
import java.sql.Connection;
import java.util.List;
import java.util.Map;
/**
* @Author Junjun
*/
public abstract class Provider {
public abstract List<String> getSchema(DatasourceRequest datasourceRequest);
public abstract List<DatasetTableDTO> getTables(DatasourceRequest datasourceRequest);
public abstract Connection getConnection(CoreDatasource coreDatasource) throws DEException;
public abstract String checkStatus(DatasourceRequest datasourceRequest) throws Exception;
public abstract Map<String, Object> fetchResultField(DatasourceRequest datasourceRequest) throws DEException;
public abstract List<TableField> fetchTableField(DatasourceRequest datasourceRequest) throws DEException;
}