diff options
author | Alexander Staubo <alex@bengler.no> | 2013-02-19 22:28:16 +0100 |
---|---|---|
committer | Alexander Staubo <alex@bengler.no> | 2014-06-22 19:13:29 -0400 |
commit | d9347943a22076911155d9a56d9a3ef6e022994b (patch) | |
tree | 0140b9e0b22204a12b5c6556d9d2b9f7c94c7414 /lib/arel/visitors/to_sql.rb | |
parent | 69e9be95ac233eb7b446920bb49399277ea594ce (diff) | |
download | rails-d9347943a22076911155d9a56d9a3ef6e022994b.tar.gz rails-d9347943a22076911155d9a56d9a3ef6e022994b.tar.bz2 rails-d9347943a22076911155d9a56d9a3ef6e022994b.zip |
Windowing: Calling #rows or #range should assign framing only once.
Diffstat (limited to 'lib/arel/visitors/to_sql.rb')
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index 8a5e1dbf25..8c63070084 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -343,11 +343,13 @@ module Arel end if o.orders.any? + collector << ' ' if o.partitions.any? collector << "ORDER BY " collector = inject_join o.orders, collector, ", " end if o.framing + collector << ' ' if o.partitions.any? or o.orders.any? collector = visit o.framing, collector end |