26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/arel/visitors/spanner.rb', line 26
def compile node, collector = Arel::Collectors::SQLString.new
collector.class.module_eval { attr_accessor :hints }
collector.class.module_eval { attr_accessor :table_hints }
collector.class.module_eval { attr_accessor :join_hints }
collector.hints = {}
collector.table_hints = {}
collector.join_hints = {}
sql, binds = accept(node, collector).value
sql = collector.hints[:statement_hint].value + sql if collector.hints[:statement_hint]
binds << collector.hints[:staleness] if collector.hints[:staleness]
[sql, binds]
end
|