2010-08-24 20:59:03 -04:00
|
|
|
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
|
2010-08-24 20:59:03 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|