cvs: pear /DB/DB common.php
| From: | Tomas V.V.Cox | Date: | Tue, 04 Jun 2002 14:17:17 +0000 |
| Subject: | cvs: pear /DB/DB common.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4408@lists.php.net to get a copy of this message | ||
cox Tue Jun 4 10:17:17 2002 EDT
Modified files:
/pear/DB/DB common.php
Log:
- Added the 'autofree' option
- make limitQuery() return the result object by reference
- use the new $options array to pass limit opts while creating
the DB_Result obj
Index: pear/DB/DB/common.php
diff -u pear/DB/DB/common.php:1.4 pear/DB/DB/common.php:1.5
--- pear/DB/DB/common.php:1.4 Sun May 26 12:14:15 2002
+++ pear/DB/DB/common.php Tue Jun 4 10:17:16 2002
@@ -16,7 +16,7 @@
// | Author: Stig Bakken <ssb@fast.no> |
// +----------------------------------------------------------------------+
//
-// $Id: common.php,v 1.4 2002/05/26 16:14:15 cox Exp $
+// $Id: common.php,v 1.5 2002/06/04 14:17:16 cox Exp $
//
// Base class for DB implementations.
//
@@ -96,6 +96,7 @@
'optimize' => 'performance',
'debug' => 0,
'seqname_format' => '%s_seq',
+ 'autofree' => false
);
/**
@@ -648,17 +649,16 @@
*
* @access public
*/
- function limitQuery($query, $from, $count)
+ function &limitQuery($query, $from, $count)
{
$query = $this->modifyLimitQuery($query, $from, $count);
$result = $this->simpleQuery($query);
if (DB::isError($result) || $result === DB_OK) {
return $result;
} else {
- $res_obj =& new DB_result($this, $result);
- $res_obj->limit_from = $from;
- $res_obj->limit_count = $count;
- return $res_obj;
+ $options['limit_from'] = $from;
+ $options['limit_count'] = $count;
+ return new DB_result($this, $result, $options);
}
}