package com.njcn.gather.systemops.database.support.spi;

import com.njcn.gather.systemops.database.pojo.po.DatabaseConnection;
import com.njcn.gather.systemops.database.pojo.vo.DatabaseTableVO;
import com.njcn.gather.systemops.database.pojo.vo.DatabaseTestResultVO;

import java.util.List;

/**
 * 按数据库类型隔离连接测试与表查询能力。
 */
public interface DatabaseConnectionOperator {

    boolean support(String dbType);

    DatabaseTestResultVO test(DatabaseConnection connection, String password);

    List<DatabaseTableVO> listTables(DatabaseConnection connection, String password, String schemaOrDatabaseName) throws Exception;
}
