提交 e60fecd8 编写于 作者: A Aaron Patterson

removing more calls to execute

上级 853d39e8
......@@ -209,12 +209,12 @@ def columns(table_name, name = nil) #:nodoc:
end
def indexes(table_name, name = nil) #:nodoc:
execute("PRAGMA index_list(#{quote_table_name(table_name)})", name).map do |row|
exec("PRAGMA index_list(#{quote_table_name(table_name)})", name).map do |row|
IndexDefinition.new(
table_name,
row['name'],
row['unique'].to_i != 0,
execute("PRAGMA index_info('#{row['name']}')").map { |col|
exec("PRAGMA index_info('#{row['name']}')").map { |col|
col['name']
})
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册