cvs: pear /DBA DBA_Table.php
| From: | Brent Cook | Date: | Thu, 18 Jul 2002 05:50:55 +0000 |
| Subject: | cvs: pear /DBA DBA_Table.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-5172@lists.php.net to get a copy of this message | ||
busterb Thu Jul 18 01:50:55 2002 EDT
Modified files:
/pear/DBA DBA_Table.php
Log:
moved system variable definitions into create(). This works around a bug in PHP
4.06 and reduces the size of a DBA_Table object, since it has one less instance
variable.
Index: pear/DBA/DBA_Table.php
diff -u pear/DBA/DBA_Table.php:1.50 pear/DBA/DBA_Table.php:1.51
--- pear/DBA/DBA_Table.php:1.50 Wed Jul 17 12:57:20 2002
+++ pear/DBA/DBA_Table.php Thu Jul 18 01:50:55 2002
@@ -18,7 +18,7 @@
// | Foundation, Inc., 59 Temple Place, Suite 330,Boston,MA 02111-1307 USA|
// +----------------------------------------------------------------------+
//
-// $Id: DBA_Table.php,v 1.50 2002/07/17 16:57:20 busterb Exp $
+// $Id: DBA_Table.php,v 1.51 2002/07/18 05:50:55 busterb Exp $
//
require_once 'PEAR.php';
require_once 'DB/DBA/DBA.php';
@@ -121,14 +121,6 @@
*/
var $_primaryKey=array();
- var $_systemVariables=array(
- '_rowid'=>array(DBA_TYPE => DBA_INTEGER,
- DBA_DEFAULT => 0,
- DBA_AUTOINCREMENT => true),
- '_timestamp'=>array(DBA_TYPE => DBA_TIMESTAMP,
- DBA_DEFAULT => 'time()',
- DBA_DEFAULTTYPE => DBA_FUNCTION)
- );
// }}}
// {{{ DBA_Table($driver = 'simple')
@@ -236,7 +228,13 @@
function create($tableName, $schema)
{
// pack the schema
- $packedSchema = $this->_packSchema($schema + $this->_systemVariables);
+ $packedSchema = $this->_packSchema($schema +
+ array('_rowid'=>array(DBA_TYPE => DBA_INTEGER,
+ DBA_DEFAULT => 0,
+ DBA_AUTOINCREMENT => true),
+ '_timestamp'=>array(DBA_TYPE => DBA_TIMESTAMP,
+ DBA_DEFAULT => 'time()',
+ DBA_DEFAULTTYPE => DBA_FUNCTION)));
if (PEAR::isError($packedSchema)) {
return $packedSchema;
}