instance method
fetch_table_collations
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
fetch_table_collations(tables)
No documentation comment.
Parameters
-
tablesreq
Source
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 757
def fetch_table_collations(tables)
fetch_by_schema(tables) do |schema, group|
by_name = query_all(<<~SQL).to_h { |row| [row["table"], row["collation"]] }
SELECT table_name AS 'table', table_collation AS 'collation'
FROM information_schema.tables
WHERE table_schema = #{schema}
AND table_name IN (#{quoted_table_names(group)})
SQL
group.index_with { |table| by_name[bare_table_name(table)] }
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb line 757
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter