cvs: pear /MDB2/MDB2/Driver/Datatype ibase.php

From: Date: Tue, 18 Oct 2005 21:36:46 +0000
Subject: cvs: pear /MDB2/MDB2/Driver/Datatype ibase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35684@lists.php.net to get a copy of this message
quipo Tue Oct 18 17:36:46 2005 EDT Modified files: /pear/MDB2/MDB2/Driver/Datatype ibase.php Log: common implementation of _getIntegerDeclaration() is ok http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Datatype/ibase.php?r1=1.49&r2=1.50&ty=u Index: pear/MDB2/MDB2/Driver/Datatype/ibase.php diff -u pear/MDB2/MDB2/Driver/Datatype/ibase.php:1.49 pear/MDB2/MDB2/Driver/Datatype/ibase.php:1.50 --- pear/MDB2/MDB2/Driver/Datatype/ibase.php:1.49 Tue Oct 18 14:57:56 2005 +++ pear/MDB2/MDB2/Driver/Datatype/ibase.php Tue Oct 18 17:36:45 2005 @@ -44,7 +44,7 @@ // | Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.49 2005/10/18 18:57:56 quipo Exp $ +// $Id: ibase.php,v 1.50 2005/10/18 21:36:45 quipo Exp $ require_once 'MDB2/Driver/Datatype/Common.php'; @@ -148,55 +148,6 @@ } // }}} - // {{{ _getIntegerDeclaration() - - /** - * Obtain DBMS specific SQL code portion needed to declare an integer type - * field to be used in statements like CREATE TABLE. - * - * @param string $name name the field to be declared. - * @param array $field associative array with the name of the properties - * of the field being declared as array indexes. Currently, the types - * of supported field properties are as follows: - * - * unsigned - * Boolean flag that indicates whether the field should be - * declared as unsigned integer if possible. - * - * default - * Integer value to be used as default for this field. - * - * notnull - * Boolean flag that indicates whether this field is constrained - * to not be set to null. - * @return string DBMS specific SQL code portion that should be used to - * declare the specified field. - * @access protected - */ - function _getIntegerDeclaration($name, $field) - { - $db =& $this->getDBInstance(); - if (PEAR::isError($db)) { - return $db; - } - - if (array_key_exists('unsigned', $field) && $field['unsigned']) { - $db->warnings[] = "unsigned integer field \"$name\" is being declared as signed integer"; - } - - if (array_key_exists('autoincrement', $field) && $field['autoincrement']) { - $name = $db->quoteIdentifier($name); - return $name.' INTEGER NOT NULL PRIMARY KEY'; - } - - $default = array_key_exists('default', $field) ? ' DEFAULT '. - $this->quote($field['default'], 'integer') : ''; - $notnull = (array_key_exists('notnull', $field) && $field['notnull']) ? ' NOT NULL' : ''; - $name = $db->quoteIdentifier($name); - return $name.' '.$this->getTypeDeclaration($field).$default.$notnull; - } - - // }}} // {{{ _quoteLOB() /**

« previous php.pear.cvs (#35684) next »