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

20 lines
484 B
Ruby
Raw Normal View History

module Arel
module Visitors
###
# This class produces SQL for JOIN clauses but omits the "single-source"
# part of the Join grammar:
#
# http://www.sqlite.org/syntaxdiagrams.html#join-source
#
# This visitor is used in SelectManager#join_sql and is for backwards
# compatibility with Arel V1.0
2010-12-03 18:24:30 -05:00
module JoinSql
2010-10-19 14:47:00 -04:00
private
2010-08-24 21:13:01 -04:00
def visit_Arel_Nodes_SelectCore o
2010-12-14 12:43:19 -05:00
o.source.right.map { |j| visit j }.join ' '
2010-08-24 21:13:01 -04:00
end
end
end
end