if (connection == null) return Collections.EMPTY_MAP;
    private Map getExtendedFieldInfo(FBConnection connection) throws SQLException {                StringBuffer sb = new StringBuffer();        ArrayList params = new ArrayList();        for (int i = 0; i < xsqlvars.length; i++) {                        String relationName = xsqlvars[i].relname;            String fieldName = xsqlvars[i].sqlname;                        if (relationName == null || fieldName == null) continue;                        sb.append(GET_FIELD_INFO);                                    params.add(fieldName);            params.add(relationName);                        if (i < xsqlvars.length - 1)                sb.append("\n").append("UNION").append("\n");                        }                ResultSet rs = connection.doQuery(            sb.toString(),             params,             ((FBDatabaseMetaData)connection.getMetaData()).statements);                    try {            HashMap result = new HashMap();                            while(rs.next()) {                ExtendedFieldInfo fieldInfo = new ExtendedFieldInfo();                                fieldInfo.relationName = rs.getString("RELATION_NAME");                fieldInfo.fieldName = rs.getString("FIELD_NAME");                fieldInfo.fieldLength = rs.getInt("FIELD_LENGTH");                fieldInfo.fieldPrecision = rs.getInt("FIELD_PRECISION");                fieldInfo.fieldScale = rs.getInt("FIELD_SCALE");                fieldInfo.fieldSubtype = rs.getInt("FIELD_SUB_TYPE");                fieldInfo.characterLength = rs.getInt("CHARACTER_LENGTH");                fieldInfo.characterSetId = rs.getInt("CHARACTER_SET_ID");                                result.put(                    new FieldKey(fieldInfo.relationName, fieldInfo.fieldName),                     fieldInfo);            }                        return result;        } finally {            rs.close();        }    }