1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-06 06:07:39 +02:00

DibiConnection: types detection + normalization is always TRUE

This commit is contained in:
David Grudl
2012-01-11 23:01:10 +01:00
parent e60dc2d2d0
commit baf08d3c71
4 changed files with 93 additions and 118 deletions

View File

@@ -534,10 +534,7 @@ class DibiColumnInfo extends DibiObject
*/
public function getType()
{
if (self::$types === NULL) {
self::$types = new DibiHashMap(array(__CLASS__, 'detectType'));
}
return self::$types->{$this->info['nativetype']};
return self::getTypeCache()->{$this->info['nativetype']};
}
@@ -640,6 +637,19 @@ class DibiColumnInfo extends DibiObject
return dibi::TEXT;
}
/**
* @internal
*/
public static function getTypeCache()
{
if (self::$types === NULL) {
self::$types = new DibiHashMap(array(__CLASS__, 'detectType'));
}
return self::$types;
}
}