method

indexes

Importance_0
v2.1.0 - Show latest stable - 0 notes - Class: ActiveRecord::ConnectionAdapters::SQLiteAdapter
indexes(table_name, name = nil) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb, line 195
      def indexes(table_name, name = nil) #:nodoc:
        execute("PRAGMA index_list(#{quote_table_name(table_name)})", name).map do |row|
          index = IndexDefinition.new(table_name, row['name'])
          index.unique = row['unique'] != '0'
          index.columns = execute("PRAGMA index_info('#{index.name}')").map { |col| col['name'] }
          index
        end
      end
Register or log in to add new notes.