Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix calculation tests on sqlite2 [#3053 state:resolved] | Jay Pignata | 2009-08-15 | 1 | -1/+1 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Adding :from scoping to ActiveRecord calculations | Matt Duncan | 2009-08-09 | 1 | -0/+2 |
| | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1229 state:committed] | ||||
* | Break up DependencyModule's dual function of providing a "depend_on" DSL and ↵ | Joshua Peek | 2009-05-28 | 1 | -1/+1 |
| | | | | "included" block DSL into separate modules. But, unify both approaches under AS::Concern. | ||||
* | Use DependencyModule for included hooks in ActiveRecord | Bryan Helmkamp | 2009-05-11 | 1 | -3/+2 |
| | |||||
* | Ensure calculations respect scoped :select [#1334 state:resolved] | stopdropandrew | 2009-03-07 | 1 | -5/+13 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Allow :having conditions to be sanitized like regular :condition. [#2158 ↵ | Will Bryant | 2009-03-06 | 1 | -3/+5 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Merge docrails | Pratik Naik | 2009-01-18 | 1 | -8/+16 |
| | |||||
* | Make sure any Fixnum returned by a DB sum is type cast to a Float before ↵ | Ken Collins | 2008-11-13 | 1 | -1/+1 |
| | | | | | | standard converstion to a BigDecimal [#8994 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Add simple case when DB calculations returns 0 instead of 0.0 [#1346 ↵ | Joshua Peek | 2008-11-10 | 1 | -1/+1 |
| | | | | state:resolved] | ||||
* | If average value from DB is 0, make sure to convert it to a 0.0 float before ↵ | Ken Collins | 2008-11-07 | 1 | -1/+1 |
| | | | | | | calling #to_d on it [#1346 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Ensure Model.sum and Model.avg typecast appropriately. [#1066 state:resolved] | Pratik Naik | 2008-10-04 | 1 | -3/+7 |
| | | | | | Model.sum delegates typecasting to the column being summed. If that's not feasible, returns a string. Model.avg always returns big decimal. | ||||
* | Remove AS for oracle compatibility | Michael Koziarski | 2008-10-03 | 1 | -1/+1 |
| | |||||
* | Interpolation requires double quotes | Michael Koziarski | 2008-09-09 | 1 | -1/+1 |
| | |||||
* | Merge docrails | Pratik Naik | 2008-09-03 | 1 | -2/+2 |
| | |||||
* | Merge scoped :joins together instead of overwriting them. May expose scoping ↵ | Andrew White | 2008-08-28 | 1 | -1/+1 |
| | | | | | | | | bugs in your code! [#501 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Alias included associations if needed when doing a count | Tarmo Tänav | 2008-08-27 | 1 | -2/+8 |
| | | | | | | [#302 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Performance: reduce garbage created by ↵ | Joshua Peek | 2008-08-26 | 1 | -1/+8 |
| | | | | ActiveRecord::Calculations#column_alias_for | ||||
* | Alias subquery used in calculations, to provide better compatibility with ↵ | Michalis Polakis | 2008-08-11 | 1 | -1/+1 |
| | | | | | | | | databases such as MonetDB Signed-off-by: Michael Koziarski <michael@koziarski.com> Signed-off-by: Tom Ward <tom@popdog.net> [#796 state:committed] | ||||
* | Add :from option to calculations. [#397 state:resolved] | Ben Munat | 2008-06-11 | 1 | -3/+9 |
| | |||||
* | Ensure AR#sum result is typecasted properly | Pratik Naik | 2008-06-02 | 1 | -2/+3 |
| | |||||
* | Ensure Associations#sum returns 0 when no rows are returned. [#295 ↵ | Jonathan Viney | 2008-06-02 | 1 | -3/+3 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Merge docrails. | Pratik Naik | 2008-05-25 | 1 | -10/+12 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Improve documentation coverage and markup | Xavier Noria | 2008-05-02 | 1 | -6/+6 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Avoid adding two DISTINCT statements to queries in sqlite 2. | Frederick Cheung | 2008-04-21 | 1 | -1/+1 |
| | |||||
* | ActiveRecord::Base#sum defaults to 0 if no rows are returned. Closes #11550 ↵ | Rick Olson | 2008-04-08 | 1 | -1/+1 |
| | | | | | | [kamal] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9243 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Don't double include DISTINCT when the user has already specified it. ↵ | Michael Koziarski | 2008-04-04 | 1 | -1/+4 |
| | | | | | | Closes #11502 [kenneth.kalmer] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9223 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Ensure that you can still do expressions in calculations (closes #11355) ↵ | David Heinemeier Hansson | 2008-03-17 | 1 | -1/+2 |
| | | | | | | [nbugajski/cavelle] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9043 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Ensure that ActiveRecord::Calculations disambiguates field names with the ↵ | Rick Olson | 2008-03-13 | 1 | -0/+1 |
| | | | | | | table name. Closes #11027 [cavalle] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9018 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Fix calculations on associations with custom :foreign_key. Closes #8117 ↵ | Jeremy Kemper | 2008-02-02 | 1 | -1/+1 |
| | | | | | | [kamal, jack] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8778 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Ruby 1.9 compat: calculations don't assume array implementation of ordered ↵ | Jeremy Kemper | 2007-12-27 | 1 | -1/+2 |
| | | | | | | hash. References #1689 [Frederick Cheung] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8494 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Remove references to nonexistent :joins documentation. Closes #10498 [tpope] | Marcel Molina | 2007-12-13 | 1 | -4/+2 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8381 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Document how the :include option can be used in Calculations::calculate. ↵ | Marcel Molina | 2007-12-05 | 1 | -0/+2 |
| | | | | | | Closes #7446 [adamwiggins, ultimoamore] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8306 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Smattering of grammatical fixes to documentation. Closes #10083 [BobSilva] | Marcel Molina | 2007-11-08 | 1 | -10/+13 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Address shortcomings of changeset [8054] [protocool] | David Heinemeier Hansson | 2007-11-07 | 1 | -15/+4 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8109 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Standardize on using hyphens rather than colons to separate option names ↵ | Marcel Molina | 2007-11-06 | 1 | -6/+6 |
| | | | | | | from their explanation in documentation. Replace + with tt tags. Closes #8732. [ryanb] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8106 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Escape table names during calculation queries. [wesley.moxam, Koz] Closes #4593 | Michael Koziarski | 2007-10-31 | 1 | -2/+2 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8061 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Introduce finder :joins with associations. Same :include syntax but with ↵ | Jeremy Kemper | 2007-10-29 | 1 | -4/+15 |
| | | | | | | inner rather than outer joins. Closes #10012. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8054 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Fix and properly document/test count(column_name) usage. Closes #8999 [lifofifo] | Rick Olson | 2007-07-17 | 1 | -8/+14 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Remove deprecated count(conditions=nil, joins=nil) usage. Closes #8993 ↵ | Rick Olson | 2007-07-16 | 1 | -27/+10 |
| | | | | | | [lifofifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7189 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Calculations support non-numeric foreign keys. Closes #8154. | Jeremy Kemper | 2007-06-01 | 1 | -1/+2 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6919 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Calculations: return nil average instead of 0 when there are no rows to ↵ | Jeremy Kemper | 2007-05-30 | 1 | -1/+1 |
| | | | | | | average. Closes #8298. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6904 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | documentation project patches, closes #7342, #7319, #7316, #7190 ↵ | Rick Olson | 2007-03-27 | 1 | -2/+2 |
| | | | | | | [jeremymcanally] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6470 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | SQLite: count(distinct) queries supported in >= 3.2.6, fix calculations ↵ | Jeremy Kemper | 2006-11-05 | 1 | -14/+21 |
| | | | | | | workaround, remove count(distinct) query rewrite, cleanup test connection scripts. Closes #6544. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5426 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Include caller of deprecated count method. | Jeremy Kemper | 2006-09-29 | 1 | -2/+3 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Deprecation: count class method should be called with an options hash rather ↵ | Jeremy Kemper | 2006-09-26 | 1 | -14/+23 |
| | | | | | | 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 | ||||
* | Fixed that count distinct should use the selected column even when using ↵ | David Heinemeier Hansson | 2006-06-03 | 1 | -1/+1 |
| | | | | | | :include (closes #5251) [anna@wota.jp] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4417 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Namespaced OrderedHash so the Rails implementation does not clash with any ↵ | Rick Olson | 2006-04-30 | 1 | -1/+1 |
| | | | | | | others. (fixes #4911) [Julian Tarkhanov] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4318 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | When grouping, use the appropriate option key. [Marcel Molina Jr.] | Marcel Molina | 2006-04-28 | 1 | -1/+5 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4297 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Add support for FrontBase (http://www.frontbase.com/) with a new adapter ↵ | Marcel Molina | 2006-04-27 | 1 | -2/+12 |
| | | | | | | thanks to the hard work of one Mike Laster. Closes #4093. [mlaster@metavillage.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4291 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Fix bug where calculations with long alias names return null. [Rick] | Rick Olson | 2006-04-25 | 1 | -4/+4 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4269 5ecf4fe2-1ee6-0310-87b1-e25e094e27de |