mirror of
https://github.com/dg/dibi.git
synced 2025-08-05 13:47:33 +02:00
- MS drivers: bool TRUE is now +1
- DibiDatabaseInfo: LONGTEXT is recognized as TEXT
This commit is contained in:
@@ -261,7 +261,7 @@ class DibiFirebirdDriver extends DibiObject implements IDibiDriver
|
||||
return $value;
|
||||
|
||||
case dibi::BOOL:
|
||||
return $value ? -1 : 0;
|
||||
return $value ? 1 : 0;
|
||||
|
||||
case dibi::DATE:
|
||||
return date("'Y-m-d'", $value);
|
||||
|
@@ -214,7 +214,7 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
return '[' . str_replace('.', '].[', $value) . ']';
|
||||
|
||||
case dibi::BOOL:
|
||||
return $value ? -1 : 0;
|
||||
return $value ? 1 : 0;
|
||||
|
||||
case dibi::DATE:
|
||||
return date("'Y-m-d'", $value);
|
||||
|
@@ -216,7 +216,7 @@ class DibiMsSql2005Driver extends DibiObject implements IDibiDriver
|
||||
return '[' . str_replace('.', '].[', $value) . ']';
|
||||
|
||||
case dibi::BOOL:
|
||||
return $value ? -1 : 0;
|
||||
return $value ? 1 : 0;
|
||||
|
||||
case dibi::DATE:
|
||||
return date("'Y-m-d'", $value);
|
||||
|
@@ -221,7 +221,7 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
return '[' . str_replace('.', '].[', $value) . ']';
|
||||
|
||||
case dibi::BOOL:
|
||||
return $value ? -1 : 0;
|
||||
return $value ? 1 : 0;
|
||||
|
||||
case dibi::DATE:
|
||||
return date("#m/d/Y#", $value);
|
||||
|
@@ -477,6 +477,7 @@ class DibiColumnInfo extends DibiObject
|
||||
{
|
||||
static $patterns = array(
|
||||
'BYTEA|BLOB|BIN' => dibi::BINARY,
|
||||
'TEXT|CHAR' => dibi::TEXT,
|
||||
'BYTE|COUNTER|SERIAL|INT|LONG' => dibi::INTEGER,
|
||||
'CURRENCY|REAL|MONEY|FLOAT|DOUBLE|DECIMAL|NUMERIC|NUMBER' => dibi::FLOAT,
|
||||
'^TIME$' => dibi::TIME,
|
||||
|
Reference in New Issue
Block a user