#primary_keys(pool, table_name)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/schema_cache.rb', line 298
def primary_keys(pool, table_name) @primary_keys.fetch(table_name) do pool.with_connection do |connection| if data_source_exists?(pool, table_name) @primary_keys[deep_deduplicate(table_name)] = deep_deduplicate(connection.primary_key(table_name)) end end end end