Class Index [+]

Quicksearch

Arel::Visitors::MySQL

Private Instance Methods

visit_Arel_Nodes_SelectCore(o) click to toggle source
    # File lib/arel/visitors/mysql.rb, line 13
13:       def visit_Arel_Nodes_SelectCore o
14:         o.froms ||= Arel.sql('DUAL')
15:         super
16:       end
visit_Arel_Nodes_SelectStatement(o) click to toggle source
 

:’( dev.mysql.com/doc/refman/5.0/en/select.html#id3482214

    # File lib/arel/visitors/mysql.rb, line 8
 8:       def visit_Arel_Nodes_SelectStatement o
 9:         o.limit = 18446744073709551615 if o.offset && !o.limit
10:         super
11:       end
visit_Arel_Nodes_UpdateStatement(o) click to toggle source
    # File lib/arel/visitors/mysql.rb, line 18
18:       def visit_Arel_Nodes_UpdateStatement o
19:         [
20:           "UPDATE #{visit o.relation}",
21:           ("SET #{o.values.map { |value| visit value }.join ', '}" unless o.values.empty?),
22:           ("WHERE #{o.wheres.map { |x| visit x }.join ' AND '}" unless o.wheres.empty?),
23:           ("ORDER BY #{o.orders.map { |x| visit x }.join(', ')}" unless o.orders.empty?),
24:           ("LIMIT #{o.limit}" if o.limit),
25:         ].compact.join ' '
26:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.