diff options
Diffstat (limited to 'lib/arel/visitors')
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index 12967d27ad..0f2de092ea 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -48,7 +48,8 @@ module Arel [ o.cores.map { |x| visit x }.join, ("ORDER BY #{o.orders.map { |x| visit x }.join(', ')}" unless o.orders.empty?), - ("LIMIT #{o.limit}" if o.limit) + ("LIMIT #{o.limit}" if o.limit), + (visit(o.lock) if o.lock), ].compact.join ' ' end @@ -66,6 +67,11 @@ module Arel "HAVING #{visit o.expr}" end + # FIXME: this does nothing on SQLLite3, but should do things on other + # databases. + def visit_Arel_Nodes_Lock o + end + def visit_Arel_Nodes_Group o visit o.expr end |