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:
parent
b0fdd290f4
commit
c51fa6bdfc
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue