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

  uses('util.Date');

  /**
   * Result set as returned from the DBConnection::query method
   *
   * Usage (abbreviated example):
   * <code>
   *   // [...]
   *   $r= $conn->query('select news_id, caption, created_at from news');
   *   while ($row= $r->next()) {
   *     var_dump($row);
   *   }
   *   $r->close();
   *   // [...]
   * </code>
   *
   * @purpose  Resultset wrapper
   */
  class ResultSet extends Object {
    public
      $handle,
      $fields;
      
    /**
     * Constructor
     *
     * @access  public
     * @param   resource handle
     * @param   array fields
     */
    public function __construct($handle, $fields) {
      
      $this->handle= $handle;
      $this->fields= $fields;
    }
    
    /**
     * Seek to a specified position within the resultset
     * 
     * @model   abstract
     * @access  public
     * @param   int offset
     * @return  bool success
     * @throws  rdbms.SQLException
     */
    public abstract function seek($offset);

    /**
     * Iterator function. Returns a rowset if called without parameter,
     * the fields contents if a field is specified or FALSE to indicate
     * no more rows are available.
     *
     * @model   abstract
     * @access  public
     * @param   string field default NULL
     * @return  mixed
     */
    public abstract function next($field= NULL);
    
    /**
     * Close resultset and free result memory
     *
     * @access  public
     * @return  bool success
     */
    public function close() { }

  }
?>
<commit_msg>- Fix "Fatal error: Class ResultSet contains 2 abstract   methods and must therefore be declared abstract - QA: WS fixes<commit_after><?php
/* This class is part of the XP framework
 *
 * $Id$ 
 */

  uses('util.Date');

  /**
   * Result set as returned from the DBConnection::query method
   *
   * Usage (abbreviated example):
   * <code>
   *   // [...]
   *   $r= $conn->query('select news_id, caption, created_at from news');
   *   while ($row= $r->next()) {
   *     var_dump($row);
   *   }
   *   $r->close();
   *   // [...]
   * </code>
   *
   * @purpose  Resultset wrapper
   */
  abstract class ResultSet extends Object {
    public
      $handle,
      $fields;
      
    /**
     * Constructor
     *
     * @access  public
     * @param   resource handle
     * @param   array fields
     */
    public function __construct($handle, $fields) {
      $this->handle= $handle;
      $this->fields= $fields;
    }
    
    /**
     * Seek to a specified position within the resultset
     * 
     * @model   abstract
     * @access  public
     * @param   int offset
     * @return  bool success
     * @throws  rdbms.SQLException
     */
    public abstract function seek($offset);

    /**
     * Iterator function. Returns a rowset if called without parameter,
     * the fields contents if a field is specified or FALSE to indicate
     * no more rows are available.
     *
     * @model   abstract
     * @access  public
     * @param   string field default NULL
     * @return  mixed
     */
    public abstract function next($field= NULL);
    
    /**
     * Close resultset and free result memory
     *
     * @access  public
     * @return  bool success
     */
    public function close() { 
    }
  }
?>

{'fraction_non_alphanumeric': 0.11966577141151895, 'fraction_numerical': 0.0002984183825723665, 'mean_word_length': 1.8996539792387543, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, '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': '3218160', 'n_tokens_mistral': 1017, 'n_tokens_neox': 991, 'n_words': 305}