<commit_before><?php
/* This class is part of the XP framework
 *
 * $Id$
 */

  uses('rdbms.tds.AbstractTdsResultSet');

  /**
   * Result set
   *
   * @purpose  Resultset wrapper
   */
  class TdsBufferedResultSet extends AbstractTdsResultSet {
    protected $records= array();

    /**
     * Constructor
     *
     * @param   resource handle
     */
    public function __construct($result, $fields, TimeZone $tz= NULL) {
      parent::__construct($result, $fields, $tz);
      do {
        try {
          if (NULL === ($record= $this->handle->fetch($this->fields))) break;
          $this->records[]= $record;
        } catch (ProtocolException $e) {
          $this->records[]= new SQLException('Failed reading rows', $e);
        }
      } while (1);
      reset($this->records);
    }
      
    /**
     * Seek
     *
     * @param   int offset
     * @return  bool success
     * @throws  rdbms.SQLException
     */
    public function seek($offset) { 
      throw new SQLException('Cannot seek to offset '.$offset);
    }<commit_msg>- QA: Update api documentation<commit_after><?php
/* This class is part of the XP framework
 *
 * $Id$
 */

  uses('rdbms.tds.AbstractTdsResultSet');

  /**
   * Result set
   *
   * @test xp://net.xp_framework.unittest.rdbms.tds.TdsBufferedResultSetTest
   */
  class TdsBufferedResultSet extends AbstractTdsResultSet {
    protected $records= array();

    /**
     * Constructor
     *
     * @param   var result
     * @param   [:var] fields
     * @param   util.TimeZone tz
     */
    public function __construct($result, $fields, TimeZone $tz= NULL) {
      parent::__construct($result, $fields, $tz);
      do {
        try {
          if (NULL === ($record= $this->handle->fetch($this->fields))) break;
          $this->records[]= $record;
        } catch (ProtocolException $e) {
          $this->records[]= new SQLException('Failed reading rows', $e);
        }
      } while (1);
      reset($this->records);
    }
      
    /**
     * Seek
     *
     * @param   int offset
     * @return  bool success
     * @throws  rdbms.SQLException
     */
    public function seek($offset) { 
      throw new SQLException('Cannot seek to offset '.$offset);
    }
{'fraction_non_alphanumeric': 0.14279258924536828, 'fraction_numerical': 0.0009037505648441031, 'mean_word_length': 2.208695652173913, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4624668', 'n_tokens_mistral': 687, 'n_tokens_neox': 673, 'n_words': 163}