cvs: pear /MDB2/MDB2/Driver/Datatype pgsql.php sqlite.php
| From: | Lukas Smith | Date: | Fri, 14 Oct 2005 10:42:01 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver/Datatype pgsql.php sqlite.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35517@lists.php.net to get a copy of this message | ||
lsmith Fri Oct 14 06:42:01 2005 EDT
Modified files:
/pear/MDB2/MDB2/Driver/Datatype pgsql.php sqlite.php
Log:
- tweaked text handling
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Datatype/pgsql.php?r1=1.32&r2=1.33&ty=u
Index: pear/MDB2/MDB2/Driver/Datatype/pgsql.php
diff -u pear/MDB2/MDB2/Driver/Datatype/pgsql.php:1.32 pear/MDB2/MDB2/Driver/Datatype/pgsql.php:1.33
--- pear/MDB2/MDB2/Driver/Datatype/pgsql.php:1.32 Fri Oct 7 06:33:36 2005
+++ pear/MDB2/MDB2/Driver/Datatype/pgsql.php Fri Oct 14 06:41:58 2005
@@ -42,7 +42,7 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
-// $Id: pgsql.php,v 1.32 2005/10/07 10:33:36 lsmith Exp $
+// $Id: pgsql.php,v 1.33 2005/10/14 10:41:58 lsmith Exp $
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -799,11 +799,15 @@
case 'char':
case 'varchar':
case 'bpchar':
- $type[] = 'text';
if ($length == '1') {
$type[] = 'boolean';
- } elseif (strstr($db_type, 'text'))
+ if (preg_match('/[is|has]/', $field['name'])) {
+ $type = array_reverse($type);
+ }
+ } elseif (strstr($db_type, 'text')) {
$type[] = 'clob';
+ }
+ $type[] = 'text';
break;
case 'date':
$type[] = 'date';
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Datatype/sqlite.php?r1=1.25&r2=1.26&ty=u
Index: pear/MDB2/MDB2/Driver/Datatype/sqlite.php
diff -u pear/MDB2/MDB2/Driver/Datatype/sqlite.php:1.25
pear/MDB2/MDB2/Driver/Datatype/sqlite.php:1.26
--- pear/MDB2/MDB2/Driver/Datatype/sqlite.php:1.25 Fri Oct 14 05:42:14 2005
+++ pear/MDB2/MDB2/Driver/Datatype/sqlite.php Fri Oct 14 06:41:58 2005
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: sqlite.php,v 1.25 2005/10/14 09:42:14 lsmith Exp $
+// $Id: sqlite.php,v 1.26 2005/10/14 10:41:58 lsmith Exp $
//
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -450,13 +450,10 @@
if (preg_match('/[is|has]/', $field['name'])) {
$type = array_reverse($type);
}
- $type[] = 'text';
- } elseif ($length) {
- $type[] = 'text';
} elseif (strstr($db_type, 'text')) {
$type[] = 'clob';
- $type[] = 'text';
}
+ $type[] = 'text';
break;
case 'enum':
preg_match_all('/\'.+\'/U',$row[$type_column], $matches);