]> git.mjollnir.org Git - moodle.git/commitdiff
Minor recordset cleanup
authorstronk7 <stronk7>
Mon, 9 Jun 2008 15:32:25 +0000 (15:32 +0000)
committerstronk7 <stronk7>
Mon, 9 Jun 2008 15:32:25 +0000 (15:32 +0000)
lib/dml/adodb_moodle_recordset.php
lib/dml/oci8po_adodb_moodle_recordset.php
lib/dml/pdo_moodle_recordset.php

index 54af15ce3d299e1eeac45285d023d3724a838da2..7a55b1762606fda4eb8a98b2d52c358e3251f160 100644 (file)
@@ -7,7 +7,8 @@ require_once($CFG->libdir.'/dml/moodle_recordset.php');
  * @package dmlib
  */
 class adodb_moodle_recordset extends moodle_recordset {
-    private $rs;
+
+    protected $rs; ///ADOdb recordset
 
     public function __construct($rs) {
         $this->rs = $rs;
index 5e56dfca321cb0b7d7d08f381acf30ff5c580370..14a58d9a5df75267c7b8cea8053fc5cc86527d95 100644 (file)
@@ -7,39 +7,12 @@ require_once($CFG->libdir.'/dml/adodb_moodle_recordset.php');
  * @package dmlib
  */
 class oci8po_adodb_moodle_recordset extends adodb_moodle_recordset {
-    private $rs;
-
-    public function __construct($rs) {
-        $this->rs = $rs;
-    }
 
     public function current() {
         /// Really DIRTY HACK for Oracle - needed because it can not see difference from NULL and ''
-        /// this can not be removed even if we chane db defaults :-(
+        /// this can not be removed even if we change db defaults :-(
         $fields = $this->rs->fields;
         array_walk($fields, array('oci8po_adodb_moodle_database', 'onespace2empty'));
         return (object)$fields;
     }
-
-    public function key() {
-        return $this->rs->_currentRow;
-    }
-
-    public function next() {
-        $this->rs->MoveNext();
-    }
-
-    public function rewind() {
-        //TODO - this does not work in Oracle :-(
-        error('Implement rewind in oracle by doing query again');
-        $this->rs->MoveFirst();
-    }
-
-    public function valid() {
-        return !$this->rs->EOF;
-    }
-
-    public function close() {
-        $this->rs->Close();
-    }
 }
index 1a4e24c4c8b016d3af32bef633b5b01dd2a509c4..3bc45d1c72b06a6ed00cae4ab501785028a7d673 100644 (file)
@@ -7,6 +7,7 @@ require_once($CFG->libdir.'/dml/moodle_recordset.php');
  * @package dmlib
  */
 class pdo_moodle_recordset extends moodle_recordset {
+
     private $sht;
 
     public function __construct($sth) {