1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

18 commits

Author SHA1 Message Date
Rick Olson
a413056407 Fix and properly document/test count(column_name) usage. Closes #8999 [lifofifo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-07-17 20:16:35 +00:00
Rick Olson
872c5f4380 Remove deprecated count(conditions=nil, joins=nil) usage. Closes #8993 [lifofifo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7189 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-07-16 20:26:10 +00:00
Jeremy Kemper
b05fc40b5d Calculations support non-numeric foreign keys. Closes #8154.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6919 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-01 03:26:51 +00:00
Jeremy Kemper
1f802968c5 Calculations: return nil average instead of 0 when there are no rows to average. Closes #8298.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6904 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-30 06:57:04 +00:00
Jeremy Kemper
9ccb12a3dd Test that calculations don't modify their options hash. References #6929. [eventualbuddha]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5931 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-14 16:19:58 +00:00
Jeremy Kemper
a0bf0195a5 Deprecation: count class method should be called with an options hash rather than two args for conditions and joins. Closes #6287.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-26 17:02:45 +00:00
Jeremy Kemper
3704088ebd has_one supports the :dependent => :delete option which skips the typical callback chain and deletes the associated object directly from the database. Closes #5927.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4848 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-29 17:06:27 +00:00
Jeremy Kemper
2a12b56841 r4704@asus: jeremy | 2006-06-27 12:00:19 -0700
decimal
 r4705@asus:  jeremy | 2006-06-27 12:20:47 -0700
 current_adapter? checks whether any of its arguments is the name of the current adapter class
 r4834@asus:  jeremy | 2006-07-08 13:08:24 -0700
 Room to float.
 r4835@asus:  jeremy | 2006-07-08 13:09:18 -0700
 Give lock test a few chances.
 r4836@asus:  jeremy | 2006-07-08 13:12:05 -0700
 Numeric and decimal columns map to BigDecimal instead of Float. Those with scale 0 map to Integer. Closes #5454.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-08 20:35:56 +00:00
Nicholas Seckar
d9125093e8 Add AssociationCollection#sum since the method_missing invokation has been shadowed by Enumerable#sum. Closes #5500.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-25 17:49:24 +00:00
David Heinemeier Hansson
6a9f47f33f Make more Firebird tests pass (closes #5188) [kennethkunz@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4420 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:47:29 +00:00
David Heinemeier Hansson
4394e402b7 Fixed that count distinct should use the selected column even when using :include (closes #5251) [anna@wota.jp]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4417 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:19:36 +00:00
Rick Olson
4251662c1a Allow all calculations to take the :include option, not just COUNT (closes #4840) [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4264 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-25 05:25:04 +00:00
Rick Olson
52d298a8bd Enable Limit/Offset in Calculations (closes #4558) [lmarlow@yahoo.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4185 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-06 15:23:56 +00:00
Rick Olson
fa4fb50186 fix calculation tests to get around inconsistent ordering of nils
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-15 03:50:47 +00:00
Rick Olson
796a43dead Allow ordering of calculated results and/or grouped fields in calculations [solo@gatelys.com] closes #4228
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3865 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-14 14:59:14 +00:00
David Heinemeier Hansson
a8d085adf0 Make calculations typecasty! (closes #4016) [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3722 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-01 16:25:14 +00:00
David Heinemeier Hansson
ad9f678d13 Compatibility patches for calculations
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:41:51 +00:00
David Heinemeier Hansson
99307b959b Added calculations: Base.count, Base.average, Base.sum, Base.minimum, Base.maxmium, and the generic Base.calculate. All can be used with :group and :having. Calculations and statitics need no longer require custom SQL. #3958 [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:06:04 +00:00