protected function processColumn($tableInfo, $col)
{
$columnId = strtolower($col['attname']);
//use column name as column Id
//$info['ColumnName'] = '"'.$columnId.'"'; //quote the column names!
$info['ColumnName'] = $columnId;
//NOT quote the column names!
$info['ColumnId'] = $columnId;
$info['ColumnIndex'] = $col['index'];
if (!(bool) $col['attnotnull']) {
$info['AllowNull'] = true;
}
if (in_array($columnId, $tableInfo->getPrimaryKeys())) {
$info['IsPrimaryKey'] = true;
}
if ($this->isForeignKeyColumn($columnId, $tableInfo)) {
$info['IsForeignKey'] = true;
}
if ((int) $col['atttypmod'] > 0) {
$info['ColumnSize'] = $col['atttypmod'];
}
// - 4;
if ((bool) $col['atthasdef']) {
$info['DefaultValue'] = $col['adsrc'];
}
//
// For a while Oracle Tables has no associated AutoIncrement Triggers
//
/*
if( $col['attisserial'] )
{
if(($sequence = $this->getSequenceName($tableInfo, $col['adsrc']))!==null)
{
$info['SequenceName'] = $sequence;
unset($info['DefaultValue']);
}
}
*/
$matches = array();
if (preg_match('/\\((\\d+)(?:,(\\d+))?+\\)/', $col['type'], $matches)) {
$info['DbType'] = preg_replace('/\\(\\d+(?:,\\d+)?\\)/', '', $col['type']);
if ($this->isPrecisionType($info['DbType'])) {
$info['NumericPrecision'] = intval($matches[1]);
if (count($matches) > 2) {
$info['NumericScale'] = intval($matches[2]);
}
} else {
$info['ColumnSize'] = intval($matches[1]);
}
} else {
$info['DbType'] = $col['type'];
}
$tableInfo->Columns[$columnId] = new TOracleTableColumn($info);
}