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
NZKoz (committer)
Mon Aug 11 07:48:45 -0700 2008
commit  c7375d74d9fff3219d4ea389ba9e36a90afe9d33
tree    80bbcb50419241e3c39f4d7f6285b37a7df65e78
parent  eb4668b26ad4aacf79488d2bee553e9452971c35
...
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