public function types($Class = 'all')
{
$Date = array('datetime', 'date', 'timestamp');
$Decimal = array('decimal', 'numeric');
$Float = array('float', 'double');
$Int = array('int', 'tinyint', 'smallint', 'mediumint', 'bigint');
$String = array('varchar', 'char', 'mediumtext', 'text');
$Length = array('varbinary');
$Other = array('enum', 'tinyblob', 'blob', 'mediumblob', 'longblob', 'ipaddress');
switch (strtolower($Class)) {
case 'date':
return $Date;
case 'decimal':
return $Decimal;
case 'float':
return $Float;
case 'int':
return $Int;
case 'string':
return $String;
case 'other':
return array_merge($Length, $Other);
case 'numeric':
return array_merge($Float, $Int, $Decimal);
case 'length':
return array_merge($String, $Length, $Decimal);
case 'precision':
return $Decimal;
default:
return array();
}
}