String sql = GET_INDEX_INFO; ArrayList params = new ArrayList(); params.add(table);  ResultSet rs = doQuery(sql, params);
    public ResultSet getIndexInfo(String catalog, String schema, String table,        boolean unique, boolean approximate) throws SQLException {        checkCatalogAndSchema(catalog, schema);        String sql = GET_INDEX_INFO;        ArrayList params = new ArrayList();        params.add(table);        ResultSet rs = doQuery(sql, params);        XSQLVAR[] xsqlvars = new XSQLVAR[13];        xsqlvars[0] = new XSQLVAR();        xsqlvars[0].sqltype = ISCConstants.SQL_VARYING;        xsqlvars[0].sqllen = 31;        xsqlvars[0].sqlname = "TABLE_CAT";        xsqlvars[0].relname = "INDEXINFO";        xsqlvars[1] = new XSQLVAR();        xsqlvars[1].sqltype = ISCConstants.SQL_VARYING;        xsqlvars[1].sqllen = 31;        xsqlvars[1].sqlname = "TABLE_SCHEM";        xsqlvars[1].relname = "INDEXINFO";        xsqlvars[2] = new XSQLVAR();        xsqlvars[2].sqltype = ISCConstants.SQL_VARYING;        xsqlvars[2].sqllen = 31;        xsqlvars[2].sqlname = "TABLE_NAME";        xsqlvars[2].relname = "INDEXINFO";        xsqlvars[3] = new XSQLVAR();        xsqlvars[3].sqltype = ISCConstants.SQL_TEXT;        xsqlvars[3].sqllen = 1;        xsqlvars[3].sqlname = "NON_UNIQUE";        xsqlvars[3].relname = "INDEXINFO";        xsqlvars[4] = new XSQLVAR();        xsqlvars[4].sqltype = ISCConstants.SQL_VARYING;        xsqlvars[4].sqllen = 31;        xsqlvars[4].sqlname = "INDEX_QUALIFIER";        xsqlvars[4].relname = "INDEXINFO";        xsqlvars[5] = new XSQLVAR();        xsqlvars[5].sqltype = ISCConstants.SQL_VARYING;        xsqlvars[5].sqllen = 31;        xsqlvars[5].sqlname = "INDEX_NAME";        xsqlvars[5].relname = "INDEXINFO";        xsqlvars[6] = new XSQLVAR();        xsqlvars[6].sqltype = ISCConstants.SQL_SHORT;        xsqlvars[6].sqlname = "TYPE";        xsqlvars[6].relname = "INDEXINFO";        xsqlvars[7] = new XSQLVAR();        xsqlvars[7].sqltype = ISCConstants.SQL_SHORT;        xsqlvars[7].sqlname = "ORDINAL_POSITION";        xsqlvars[7].relname = "INDEXINFO";        xsqlvars[8] = new XSQLVAR();        xsqlvars[8].sqltype = ISCConstants.SQL_VARYING;        xsqlvars[8].sqllen = 31;        xsqlvars[8].sqlname = "COLUMN_NAME";        xsqlvars[8].relname = "INDEXINFO";        xsqlvars[9] = new XSQLVAR();        xsqlvars[9].sqltype = ISCConstants.SQL_VARYING;        xsqlvars[9].sqllen = 31;        xsqlvars[9].sqlname = "ASC_OR_DESC";        xsqlvars[9].relname = "INDEXINFO";        xsqlvars[10] = new XSQLVAR();        xsqlvars[10].sqltype = ISCConstants.SQL_LONG;        xsqlvars[10].sqlname = "CARDINALITY";        xsqlvars[10].relname = "INDEXINFO";        xsqlvars[11] = new XSQLVAR();        xsqlvars[11].sqltype = ISCConstants.SQL_LONG;        xsqlvars[11].sqlname = "PAGES";        xsqlvars[11].relname = "INDEXINFO";        xsqlvars[12] = new XSQLVAR();        xsqlvars[12].sqltype = ISCConstants.SQL_VARYING;        xsqlvars[12].sqllen = 31;        xsqlvars[12].sqlname = "FILTER_CONDITION";        xsqlvars[12].relname = "INDEXINFO";        ArrayList rows = new ArrayList();        while (rs.next()) {            byte[][] row = new byte[13][];            row[0] = null;            row[1] = null;            row[2] = getBytes(rs.getString("TABLE_NAME").trim());            int nonUnique = rs.getInt("NON_UNIQUE");            if (nonUnique==0)                row[3] = getBytes("T");            else                row[3] = getBytes("F");            row[4] = null;            row[5] = getBytes(rs.getString("INDEX_NAME").trim());            row[6] = xsqlvars[0].encodeShort((short) DatabaseMetaData.tableIndexOther);            row[7] = xsqlvars[0].encodeShort(rs.getShort("ORDINAL_POSITION"));            row[8] = getBytes(rs.getString("COLUMN_NAME").trim());            int index_type = rs.getInt("ASC_OR_DESC");            if (index_type == 1)                row[9] = getBytes("D");            else                row[9] = getBytes("A");            row[10] = xsqlvars[0].encodeInt(0);            row[11] = xsqlvars[0].encodeInt(0);            row[12] = null;            rows.add(row);        }        return new FBResultSet(xsqlvars, rows);    }