class DataBaseDao extends BaseDao {

    public List<DataBaseInfo> getAllDbByAppId(String appid) throws SQLException {
        String sql = "select t1.id, t1.db_name, t1.comment,t1.dal_group_id, t1.db_address, t1.db_port, t1.db_user, t1.db_password, t1.db_catalog, t1.db_type from alldbs t1\n" +
                "inner join (\n" +
                "select distinct a1.db_Id from databasesetentry a1\n" +
                "inner join databaseset a2 on a1.dbset_id = a2.id\n" +
                "inner join project_dbset_relation a3 on a3.dbset_id = a2.id\n" +
                "inner join project a4 on a4.id = project_id\n" +
                "where a4.app_id = '" + appid +
                "') t2 on t1.id= t2.db_Id";
        return this.queryBySql(sql, DataBaseInfo.class);
    }

}