package com.purui.prims.headless.core.adaptor.db;

import com.purui.prims.headless.core.pojo.ConnectInfo;
import com.purui.prims.headless.core.pojo.DBColumn;

import java.sql.SQLException;
import java.util.List;

/**
 * 数据适配接口
 */
public interface DbAdaptor {

    String getDateFormat(String dateType, String dateFormat, String column);

    String functionNameCorrector(String sql);

    List<String> getDBs(ConnectInfo connectInfo) throws SQLException;

    List<String> getTables(ConnectInfo connectInfo, String schemaName) throws SQLException;

    List<DBColumn> getColumns(ConnectInfo connectInfo, String schemaName, String tableName) throws SQLException;
}
