public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
fix calculations for the Oracle Adapter (closes #4626) [Michael Schoen]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4192 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
technoweenie (author)
Thu Apr 06 13:10:44 -0700 2006
commit  9466211d42ce7ecd921ef6804e77d199e1677d89
tree    4e36b50320e64360cfc9b2b0c4fbfa88abb4e400
parent  496725022a09cd2100e1550745064fb5a6308ee4
...
145
146
147
148
 
149
150
151
...
154
155
156
157
 
158
159
160
...
145
146
147
 
148
149
150
151
...
154
155
156
 
157
158
159
160
0
@@ -145,7 +145,7 @@
0
       protected
0
         def construct_calculation_sql(aggregate, aggregate_alias, options) #:nodoc:
0
           scope = scope(:find)
0
- sql = ["SELECT #{aggregate} AS #{aggregate_alias}"]
0
+ sql = "SELECT #{aggregate} AS #{aggregate_alias}"
0
           sql << ", #{options[:group_field]} AS #{options[:group_alias]}" if options[:group]
0
           sql << " FROM #{table_name} "
0
           add_joins!(sql, options, scope)
0
@@ -154,7 +154,7 @@
0
           sql << " HAVING #{options[:having]}" if options[:group] && options[:having]
0
           sql << " ORDER BY #{options[:order]}" if options[:order]
0
           add_limit!(sql, options)
0
- sql.join
0
+ sql
0
         end
0
 
0
         def execute_simple_calculation(operation, column_name, column, aggregate, aggregate_alias, options) #:nodoc:

Comments

    No one has commented yet.