[prev in list] [next in list] [prev in thread] [next in thread]
List: pear-cvs
Subject: [PEAR-CVS] cvs: pear /MDB2 MDB2.php /MDB2/MDB2/Driver/Datatype Common.php
From: "Ali Fazelzadeh" <afz () php ! net>
Date: 2008-01-30 14:08:57
Message-ID: cvsafz1201702137 () cvsserver
[Download RAW message or body]
afz Wed Jan 30 14:08:57 2008 UTC
Modified files:
/pear/MDB2 MDB2.php
/pear/MDB2/MDB2/Driver/Datatype Common.php
Log:
add new pram to get declaration fields.(some RDBMS have different field definition \
between adding and altering like MSSQL)
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2.php?r1=1.307&r2=1.308&diff_format=u
Index: pear/MDB2/MDB2.php
diff -u pear/MDB2/MDB2.php:1.307 pear/MDB2/MDB2.php:1.308
--- pear/MDB2/MDB2.php:1.307 Sat Nov 10 13:29:05 2007
+++ pear/MDB2/MDB2.php Wed Jan 30 14:08:57 2008
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2.php,v 1.307 2007/11/10 13:29:05 quipo Exp $
+// $Id: MDB2.php,v 1.308 2008/01/30 14:08:57 afz Exp $
//
/**
@@ -3050,13 +3050,13 @@
*
* @access public
*/
- function getDeclaration($type, $name, $field)
+ function getDeclaration($type, $name, $field, $altering = false)
{
$result = $this->loadModule('Datatype', null, true);
if (PEAR::isError($result)) {
return $result;
}
- return $this->datatype->getDeclaration($type, $name, $field);
+ return $this->datatype->getDeclaration($type, $name, $field, $altering);
}
// }}}
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Datatype/Common.php?r1=1.128&r2=1.129&diff_format=u
Index: pear/MDB2/MDB2/Driver/Datatype/Common.php
diff -u pear/MDB2/MDB2/Driver/Datatype/Common.php:1.128 \
pear/MDB2/MDB2/Driver/Datatype/Common.php:1.129
--- pear/MDB2/MDB2/Driver/Datatype/Common.php:1.128 Fri Nov 9 20:54:58 2007
+++ pear/MDB2/MDB2/Driver/Datatype/Common.php Wed Jan 30 14:08:57 2008
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: Common.php,v 1.128 2007/11/09 20:54:58 quipo Exp $
+// $Id: Common.php,v 1.129 2008/01/30 14:08:57 afz Exp $
require_once 'MDB2/LOB.php';
@@ -336,7 +336,7 @@
* declare the specified field.
* @access public
*/
- function getDeclaration($type, $name, $field)
+ function getDeclaration($type, $name, $field, $altering = false)
{
$db =& $this->getDBInstance();
if (PEAR::isError($db)) {
@@ -356,7 +356,7 @@
return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null,
'type not defined: '.$type, __FUNCTION__);
}
- return $this->{"_get{$type}Declaration"}($name, $field);
+ return $this->{"_get{$type}Declaration"}($name, $field, $altering);
}
// }}}
@@ -451,7 +451,7 @@
* declare the specified field, or a MDB2_Error on failure
* @access protected
*/
- function _getDeclaration($name, $field)
+ function _getDeclaration($name, $field, $altering = false)
{
$db =& $this->getDBInstance();
if (PEAR::isError($db)) {
@@ -459,7 +459,7 @@
}
$name = $db->quoteIdentifier($name, true);
- $declaration_options = $db->datatype->_getDeclarationOptions($field);
+ $declaration_options = $db->datatype->_getDeclarationOptions($field, \
$altering); if (PEAR::isError($declaration_options)) {
return $declaration_options;
}
@@ -492,7 +492,7 @@
* declare the specified field's options.
* @access protected
*/
- function _getDeclarationOptions($field)
+ function _getDeclarationOptions($field, $altering = false)
{
$charset = empty($field['charset']) ? '' :
' '.$this->_getCharsetFieldDeclaration($field['charset']);
@@ -586,7 +586,7 @@
* declare the specified field.
* @access protected
*/
- function _getIntegerDeclaration($name, $field)
+ function _getIntegerDeclaration($name, $field, $altering = false)
{
if (!empty($field['unsigned'])) {
$db =& $this->getDBInstance();
@@ -596,7 +596,7 @@
$db->warnings[] = "unsigned integer field \"$name\" is being declared as \
signed integer"; }
- return $this->_getDeclaration($name, $field);
+ return $this->_getDeclaration($name, $field, $altering);
}
// }}}
@@ -626,9 +626,9 @@
* declare the specified field.
* @access protected
*/
- function _getTextDeclaration($name, $field)
+ function _getTextDeclaration($name, $field, $altering = false)
{
- return $this->_getDeclaration($name, $field);
+ return $this->_getDeclaration($name, $field, $altering);
}
// }}}
@@ -655,7 +655,7 @@
* declare the specified field.
* @access public
*/
- function _getCLOBDeclaration($name, $field)
+ function _getCLOBDeclaration($name, $field, $altering = false)
{
$db =& $this->getDBInstance();
if (PEAR::isError($db)) {
@@ -691,7 +691,7 @@
* declare the specified field.
* @access protected
*/
- function _getBLOBDeclaration($name, $field)
+ function _getBLOBDeclaration($name, $field, $altering = false)
{
$db =& $this->getDBInstance();
if (PEAR::isError($db)) {
@@ -725,9 +725,9 @@
* declare the specified field.
* @access protected
*/
- function _getBooleanDeclaration($name, $field)
+ function _getBooleanDeclaration($name, $field, $altering = false)
{
- return $this->_getDeclaration($name, $field);
+ return $this->_getDeclaration($name, $field, $altering);
}
// }}}
@@ -752,9 +752,9 @@
* declare the specified field.
* @access protected
*/
- function _getDateDeclaration($name, $field)
+ function _getDateDeclaration($name, $field, $altering = false)
{
- return $this->_getDeclaration($name, $field);
+ return $this->_getDeclaration($name, $field, $altering);
}
// }}}
@@ -779,9 +779,9 @@
* declare the specified field.
* @access protected
*/
- function _getTimestampDeclaration($name, $field)
+ function _getTimestampDeclaration($name, $field, $altering = false)
{
- return $this->_getDeclaration($name, $field);
+ return $this->_getDeclaration($name, $field, $altering);
}
// }}}
@@ -806,9 +806,9 @@
* declare the specified field.
* @access protected
*/
- function _getTimeDeclaration($name, $field)
+ function _getTimeDeclaration($name, $field, $altering = false)
{
- return $this->_getDeclaration($name, $field);
+ return $this->_getDeclaration($name, $field, $altering);
}
// }}}
@@ -833,9 +833,9 @@
* declare the specified field.
* @access protected
*/
- function _getFloatDeclaration($name, $field)
+ function _getFloatDeclaration($name, $field, $altering = false)
{
- return $this->_getDeclaration($name, $field);
+ return $this->_getDeclaration($name, $field, $altering);
}
// }}}
@@ -860,9 +860,9 @@
* declare the specified field.
* @access protected
*/
- function _getDecimalDeclaration($name, $field)
+ function _getDecimalDeclaration($name, $field, $altering = false)
{
- return $this->_getDeclaration($name, $field);
+ return $this->_getDeclaration($name, $field, $altering);
}
// }}}
--
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic