class DataBaseDao extends BaseDao {

    public DataBaseInfo getMasterCologByDatabaseSetId(Long dbset_id) throws SQLException {
        String sql = "SELECT db.id, db.db_name, db.dal_group_id, db.db_address, db.db_port, db.db_user, db.db_catalog, db.db_password, db.db_type, db.insert_time, db.update_time, db.comment " +
                "FROM alldbs as db " +
                "inner join databasesetentry as en on en.db_Id = db.id " +
                "WHERE en.database_type = 1 and en.dbset_id = " + dbset_id + " order by en.id asc limit 1 ";
        List<DataBaseInfo> list = this.queryBySql(sql, DataBaseInfo.class);
        return CollectionUtils.isNotEmpty(list) ? list.get(0) : null;
    }

}