ResultSetReference getResult(Connection conn, Parameter p) throws SQLException {
        if (!p.has(1)) {
            throw new UsageException(getUsage());
        }
        final String cmd = p.asString();
        final String tableName = p.at(1);
        final String option = p.at(2);
        try {
            DatabaseMetaData dbmeta = conn.getMetaData();
            if (option.equalsIgnoreCase("FULL")) {
                return getTableFullDescription(dbmeta, tableName, cmd);
            } else if (option.equalsIgnoreCase("PK")) {
                return getPrimaryKeyInfo(dbmeta, tableName, cmd);
            } else if (option.equalsIgnoreCase("INDEX")) {
                return getIndexInfo(dbmeta, tableName, cmd);
            }
            return getTableDescription(dbmeta, tableName, cmd);
        } catch (Throwable th) {
            if (th instanceof SQLException) {
                throw (SQLException)th;
            } else if (th instanceof RuntimeException) {
                throw (RuntimeException)th;
            }
            throw new CommandException(th);
        }
    }