Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Rename CalculationMethods to Calculations and get rid of the old ↵ | Pratik Naik | 2010-01-19 | 1 | -9/+0 |
| | | | | Calculations module | ||||
* | Move the only remaining calculation method calculate() to Relation | Pratik Naik | 2010-01-19 | 1 | -53/+1 |
| | |||||
* | Delegate count to Relation | Pratik Naik | 2010-01-19 | 1 | -62/+1 |
| | |||||
* | Delegate :average, :minimum, :maximum, :sum to Relation | Pratik Naik | 2010-01-19 | 1 | -35/+1 |
| | |||||
* | Add Relation#construct_relation_for_association_calculations for ↵ | Pratik Naik | 2010-01-19 | 1 | -21/+4 |
| | | | | calculations with includes | ||||
* | Simplify calculation scope building. Remove :order from associations as it ↵ | Pratik Naik | 2010-01-18 | 1 | -14/+1 |
| | | | | is troublesome w/ calculation methods using postgresql. | ||||
* | Remove construct_calculation_arel_with_included_associations because it's ↵ | Pratik Naik | 2010-01-18 | 1 | -27/+1 |
| | | | | same as construct_finder_arel_with_included_associations | ||||
* | No need to pass current_scoped_methods to construct_calculation_arel everytime | Pratik Naik | 2010-01-18 | 1 | -18/+18 |
| | |||||
* | Rename Model.active_relation to Model.unscoped | Pratik Naik | 2010-01-17 | 1 | -2/+2 |
| | |||||
* | Get rid of Base#merge_includes | Pratik Naik | 2010-01-16 | 1 | -1/+2 |
| | |||||
* | Make sure Model#active_relation always adds STI conditions if needed | Pratik Naik | 2010-01-16 | 1 | -4/+0 |
| | |||||
* | Use Relation#apply_finder_options from calculations | Pratik Naik | 2010-01-16 | 1 | -16/+3 |
| | |||||
* | Remove scope related code from construct_join | Pratik Naik | 2010-01-16 | 1 | -1/+1 |
| | |||||
* | Make scopes use relations under the hood | Pratik Naik | 2010-01-16 | 1 | -24/+49 |
| | |||||
* | Rename Model.arel_table to Model.active_relation | Pratik Naik | 2010-01-02 | 1 | -2/+2 |
| | |||||
* | Migrate all the calculation methods to Relation | Pratik Naik | 2009-12-29 | 1 | -143/+57 |
| | |||||
* | Add Model.having and Relation#having | Pratik Naik | 2009-12-29 | 1 | -1/+1 |
| | |||||
* | Rename Model.conditions and relation.conditions to .where | Pratik Naik | 2009-12-26 | 1 | -1/+1 |
| | |||||
* | Revert "Split arel_table into method to get a relation and another to ↵ | Jeremy Kemper | 2009-11-13 | 1 | -2/+2 |
| | | | | | | memoize the default relation." This reverts commit bd51790895fc75a3b4e19e8dd7aa6dc389d77068. | ||||
* | Split arel_table into method to get a relation and another to memoize the ↵ | Jeremy Kemper | 2009-11-13 | 1 | -2/+2 |
| | | | | default relation. | ||||
* | Use immutable relation objects to generate queries. | Emilio Tagua | 2009-08-18 | 1 | -8/+7 |
| | |||||
* | Use finder options as relation method names to provide more familiar | Emilio Tagua | 2009-08-18 | 1 | -9/+9 |
| | | | | | naming. Use bang methods convention in methods that alter the relation. | ||||
* | Remove group when building the relation, it will be added later if | Emilio Tagua | 2009-08-16 | 1 | -1/+0 |
| | | | | options[:group] is given. | ||||
* | Don't use regular rinder on calculations since scoping order blows | Emilio Tagua | 2009-08-14 | 1 | -1/+7 |
| | | | | PostreSQL. | ||||
* | Use ARel's joins when building a query for finding records with included | Emilio Tagua | 2009-08-14 | 1 | -17/+6 |
| | | | | associations. | ||||
* | Merge commit 'rails/master' | Emilio Tagua | 2009-08-10 | 1 | -1/+0 |
|\ | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/calculations.rb activerecord/lib/active_record/connection_adapters/mysql_adapter.rb activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | ||||
| * | 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] | ||||
* | | Don't scope order in calculations.' | Emilio Tagua | 2009-08-07 | 1 | -1/+1 |
| | | |||||
* | | More work on removing plain SQL from associations and use ARel instead. | Emilio Tagua | 2009-08-07 | 1 | -11/+20 |
| | | |||||
* | | Refactoring: Calculations now use construct_finder_sql instead they own method. | Emilio Tagua | 2009-06-23 | 1 | -19/+4 |
| | | |||||
* | | Merge commit 'rails/master' | Emilio Tagua | 2009-06-02 | 1 | -1/+1 |
|\| | | | | | | | | | | | Conflicts: activerecord/lib/active_record.rb | ||||
| * | 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. | ||||
* | | Refactors to work with latest Arel implementation. | Emilio Tagua | 2009-06-02 | 1 | -10/+9 |
| | | |||||
* | | Merge commit 'rails/master' | Emilio Tagua | 2009-05-12 | 1 | -3/+2 |
|\| | |||||
| * | Use DependencyModule for included hooks in ActiveRecord | Bryan Helmkamp | 2009-05-11 | 1 | -3/+2 |
| | | |||||
* | | Refactor to calculations. Migration's versions are string not integer. ARel ↵ | Emilio Tagua | 2009-05-06 | 1 | -9/+8 |
| | | | | | | | | submodule updated. | ||||
* | | Fixes to have all test passing on PostgreSQL. | Emilio Tagua | 2009-05-04 | 1 | -6/+22 |
| | | | | | | | | | | | | Calculations now use construct_calculation_arel, making construct_finder_arel less hackish. Updated ARel to support PostgreSQL. | ||||
* | | Refactor to use arel_table method, and also use the same method name for ↵ | Emilio Tagua | 2009-05-02 | 1 | -9/+7 |
| | | | | | | | | instance and class methods. | ||||
* | | Calculations now use Arel to construct the query. | Emilio Tagua | 2009-04-29 | 1 | -111/+86 |
|/ | | | | Implemented other methods in AR::Base with Arel support. | ||||
* | 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> |