private function BuildIndex(array $Columns, array $IndexKeyInfoRows)
{
$IndexType = null;
$IndexInfoRow = $IndexKeyInfoRows[0];
$IndexName = $IndexInfoRow['INDEX_NAME'];
$StorageType = $IndexInfoRow['INDEX_TYPE'];
if ($StorageType === 'FULLTEXT') {
$IndexType = Traits\IndexType::FullText;
} else {
if (!$IndexInfoRow['NON_UNIQUE']) {
$IndexType = Traits\IndexType::Unique;
$StorageType = $this->MapStorageType($StorageType);
} else {
$IndexType = Traits\IndexType::Plain;
$StorageType = $this->MapStorageType($StorageType);
}
}
$IndexColumns = $this->GetColumnsFromRows($Columns, $IndexKeyInfoRows, 'SEQ_IN_INDEX', 'COLUMN_NAME');
return new Tables\Index($IndexName, $IndexColumns, $IndexType, $StorageType);
}