Phalcon\Db\Dialect\Oracle::describeIndexes PHP Method

describeIndexes() public method

Generates SQL to query indexes on a table.
public describeIndexes ( string $table, string $schema = null ) : string
$table string
$schema string
return string
    public function describeIndexes($table, $schema = null)
    {
        $table = $this->escape($table);
        $sql = 'SELECT I.TABLE_NAME, 0 AS C0, I.INDEX_NAME, IC.COLUMN_POSITION, IC.COLUMN_NAME ' . 'FROM ALL_INDEXES I JOIN ALL_IND_COLUMNS IC ON I.INDEX_NAME = IC.INDEX_NAME WHERE  I.TABLE_NAME = ' . Text::upper($table);
        if (!empty($schema)) {
            $schema = $this->escapeSchema($schema);
            $sql .= ' AND IC.INDEX_OWNER = %s' . Text::upper($schema);
        }
        return $sql;
    }