diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-01-30 14:31:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-30 14:31:43 -0500 |
commit | d6af2090b16f7d061aa43913d610c6fada58b7e2 (patch) | |
tree | 0e33ae43122e4c8bb6bbfb6a636a790eb024eba3 | |
parent | f5f81be73df89011fe9bc89915b99d81e0c9a67f (diff) | |
parent | 9dbd97e8e2361de2769c2bc5737b64cdf27025ea (diff) | |
download | rails-d6af2090b16f7d061aa43913d610c6fada58b7e2.tar.gz rails-d6af2090b16f7d061aa43913d610c6fada58b7e2.tar.bz2 rails-d6af2090b16f7d061aa43913d610c6fada58b7e2.zip |
Merge pull request #468 from zhufenggood/master
Update to_sql.rb. Little performance improvement.
-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 |