public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Alias subquery used in calculations, to provide better compatibility with 
databases such as MonetDB

Signed-off-by: Michael Koziarski <michael@koziarski.com>
Signed-off-by: Tom Ward <tom@popdog.net>
[#796 state:committed]
Michalis Polakis (author)
Mon Aug 11 06:53:24 -0700 2008
Tarmo Tänav (committer)
Sun Aug 24 09:38:30 -0700 2008
commit  b6ad9a75ccf0e8734312357a7ac9dd7c47fd4cf1
tree    3784fd5e6490fc2440162b5bda28fb0ad7f984a7
parent  e7b00c113a71c8aafcca1974ef34d22da1bcd2b8
...
211
212
213
214
 
215
216
217
...
211
212
213
 
214
215
216
217
0
@@ -211,7 +211,7 @@ module ActiveRecord
0
 
0
           sql << " ORDER BY #{options[:order]} "       if options[:order]
0
           add_limit!(sql, options, scope)
0
-          sql << ')' if use_workaround
0
+          sql << ') AS #{aggregate_alias}_subquery' if use_workaround
0
           sql
0
         end
0
 

Comments

adkron Thu Oct 02 07:41:52 -0700 2008

This commit breaks oracle calculations.