cvs: pear /MDB2/MDB2/Driver/Datatype sqlite.php
| From: | Lukas Smith | Date: | Fri, 14 Oct 2005 09:42:14 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver/Datatype sqlite.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35511@lists.php.net to get a copy of this message | ||
lsmith Fri Oct 14 05:42:14 2005 EDT
Modified files:
/pear/MDB2/MDB2/Driver/Datatype sqlite.php
Log:
- tweaked lob handling in mapNativeDatatype()
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Datatype/sqlite.php?r1=1.24&r2=1.25&ty=u
Index: pear/MDB2/MDB2/Driver/Datatype/sqlite.php
diff -u pear/MDB2/MDB2/Driver/Datatype/sqlite.php:1.24
pear/MDB2/MDB2/Driver/Datatype/sqlite.php:1.25
--- pear/MDB2/MDB2/Driver/Datatype/sqlite.php:1.24 Thu Sep 29 10:45:36 2005
+++ pear/MDB2/MDB2/Driver/Datatype/sqlite.php Fri Oct 14 05:42:14 2005
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: sqlite.php,v 1.24 2005/09/29 14:45:36 lsmith Exp $
+// $Id: sqlite.php,v 1.25 2005/10/14 09:42:14 lsmith Exp $
//
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -445,14 +445,18 @@
case 'char':
case 'varchar':
case "varchar2":
- $type[] = 'text';
if ($length == '1') {
$type[] = 'boolean';
if (preg_match('/[is|has]/', $field['name'])) {
$type = array_reverse($type);
}
- } elseif (strstr($db_type, 'text'))
+ $type[] = 'text';
+ } elseif ($length) {
+ $type[] = 'text';
+ } elseif (strstr($db_type, 'text')) {
$type[] = 'clob';
+ $type[] = 'text';
+ }
break;
case 'enum':
preg_match_all('/\'.+\'/U',$row[$type_column], $matches);
@@ -492,7 +496,7 @@
case 'mediumblob':
case 'longblob':
case 'blob':
- $type[] = 'text';
+ $type[] = 'blob';
$length = null;
break;
case 'year':