1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

ignore raw_sql_ table alias that is used by Oracle adapter

This commit is contained in:
Raimonds Simanovskis 2010-05-17 00:19:18 +03:00
parent b0fdd290f4
commit c51fa6bdfc

View file

@ -364,7 +364,8 @@ module ActiveRecord
def tables_in_string(string)
return [] if string.blank?
# always convert table names to downcase as in Oracle quoted table names are in uppercase
string.scan(/([a-zA-Z_][\.\w]+).?\./).flatten.map(&:downcase).uniq
# ignore raw_sql_ that is used by Oracle adapter as alias for limit/offset subqueries
string.scan(/([a-zA-Z_][\.\w]+).?\./).flatten.map(&:downcase).uniq - ['raw_sql_']
end
end