diff options
author | zhufenggood <zhufenggood@gmail.com> | 2017-01-27 18:43:34 +0800 |
---|---|---|
committer | zhufenggood <zhufenggood@gmail.com> | 2017-01-27 18:43:34 +0800 |
commit | 9dbd97e8e2361de2769c2bc5737b64cdf27025ea (patch) | |
tree | 0e33ae43122e4c8bb6bbfb6a636a790eb024eba3 /lib | |
parent | f5f81be73df89011fe9bc89915b99d81e0c9a67f (diff) | |
download | rails-9dbd97e8e2361de2769c2bc5737b64cdf27025ea.tar.gz rails-9dbd97e8e2361de2769c2bc5737b64cdf27025ea.tar.bz2 rails-9dbd97e8e2361de2769c2bc5737b64cdf27025ea.zip |
Performance improvement.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index ce9f8bca59..486c51a183 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -80,7 +80,7 @@ module Arel collector << 'DELETE FROM ' collector = visit o.relation, collector if o.wheres.any? - collector << ' WHERE ' + collector << WHERE collector = inject_join o.wheres, collector, AND end @@ -265,12 +265,12 @@ module Arel def visit_Arel_Nodes_With o, collector collector << "WITH " - inject_join o.children, collector, ', ' + inject_join o.children, collector, COMMA end def visit_Arel_Nodes_WithRecursive o, collector collector << "WITH RECURSIVE " - inject_join o.children, collector, ', ' + inject_join o.children, collector, COMMA end def visit_Arel_Nodes_Union o, collector @@ -524,7 +524,7 @@ module Arel end if o.right.any? collector << SPACE if o.left - collector = inject_join o.right, collector, ' ' + collector = inject_join o.right, collector, SPACE end collector end |