class DataBaseDao extends BaseDao {

    public DataBaseInfo getDatabaseByName(String name) throws SQLException {
        String sql = "select id, db_name, comment,dal_group_id, db_address, db_port, db_user, db_password, db_catalog, db_type from alldbs where db_name = '" + name + "' limit 1";
        List<DataBaseInfo> list = this.queryBySql(sql, DataBaseInfo.class);
        return CollectionUtils.isNotEmpty(list) ? list.get(0) : null;
    }

}