@@ 463-475 (lines=13) @@ | ||
460 | * @param string $tableName Table Name |
|
461 | * @return array |
|
462 | */ |
|
463 | protected function getIndexes($tableName) |
|
464 | { |
|
465 | $indexes = []; |
|
466 | $rows = $this->fetchAll(sprintf('SHOW INDEXES FROM %s', $this->quoteTableName($tableName))); |
|
467 | foreach ($rows as $row) { |
|
468 | if (!isset($indexes[$row['Key_name']])) { |
|
469 | $indexes[$row['Key_name']] = ['columns' => []]; |
|
470 | } |
|
471 | $indexes[$row['Key_name']]['columns'][] = strtolower($row['Column_name']); |
|
472 | } |
|
473 | ||
474 | return $indexes; |
|
475 | } |
|
476 | ||
477 | /** |
|
478 | * {@inheritdoc} |
@@ 487-502 (lines=16) @@ | ||
484 | * @param string $tableName Table Name |
|
485 | * @return array |
|
486 | */ |
|
487 | public function getIndexes($tableName) |
|
488 | { |
|
489 | $indexes = []; |
|
490 | $sql = "SELECT index_owner as owner,index_name,column_name FROM ALL_IND_COLUMNS |
|
491 | WHERE TABLE_NAME = '$tableName'"; |
|
492 | ||
493 | $rows = $this->fetchAll($sql); |
|
494 | foreach ($rows as $row) { |
|
495 | if (!isset($indexes[$row['INDEX_NAME']])) { |
|
496 | $indexes[$row['INDEX_NAME']] = ['columns' => []]; |
|
497 | } |
|
498 | $indexes[$row['INDEX_NAME']]['columns'][] = strtoupper($row['COLUMN_NAME']); |
|
499 | } |
|
500 | ||
501 | return $indexes; |
|
502 | } |
|
503 | ||
504 | /** |
|
505 | * {@inheritdoc} |