package com.seeyon.apps.src_ydctdatasync.dao;

import com.seeyon.ctp.common.exceptions.BusinessException;
import com.seeyon.ctp.util.JDBCAgent;

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

public class KsQueryDao {

    public Map<String,Object> queryByName(String name,String clause,String table) throws BusinessException, SQLException {
        JDBCAgent agent = new JDBCAgent();
        String sql = "SELECT * FROM" + table + clause +";";
        List<String> params = new ArrayList<>();
        agent.execute(sql,params);
        return agent.resultSetToMap();
    }
}
