Commit Graph

3478 Commits

Author SHA1 Message Date
Pratik Naik
fa9f000246 Use quoted_table_name with arel.from() if no from values explicitly supplied. Arel seems to be spending a lot of time figuring out the FROM value otherwise. 2010-01-21 01:37:02 +05:30
Pratik Naik
798d2828dc Cache quoted_table_name 2010-01-21 01:28:50 +05:30
Pratik Naik
24cc9e5b4f Relation#spawn is basically clone + reset 2010-01-21 00:41:15 +05:30
Pratik Naik
8bdcb6f072 Always use table.* in the finder query unless specified 2010-01-21 00:40:38 +05:30
Pratik Naik
459e9b29d4 Use @limit_value and @offset_value instead of calling arel 2010-01-20 22:20:56 +05:30
Pratik Naik
8d31c9f3a0 Move update and update_all to Relation 2010-01-20 22:20:56 +05:30
Pratik Naik
f7d94cdc6d Fix AP's AR integration tests warning 2010-01-20 20:40:20 +05:30
Pratik Naik
1fb78e3ed8 Base.merge_conditions is no longer needed 2010-01-20 20:37:17 +05:30
Pratik Naik
8b9bfbe225 Dont delegate Relation#update to arel 2010-01-20 19:01:26 +05:30
Pratik Naik
f216fadc0e Delegate delete_all to Relation 2010-01-20 18:33:14 +05:30
Pratik Naik
9756805676 Move destroy to Relation 2010-01-20 18:28:45 +05:30
Pratik Naik
223e2a2709 Remove Base.delete as it's same as Relation#delete 2010-01-20 18:24:36 +05:30
Pratik Naik
2493229674 Delegate exists? to Relation 2010-01-20 18:17:37 +05:30
Pratik Naik
8f0f02a166 Make Relation#destroy_all handle all the cases 2010-01-20 18:12:50 +05:30
Pratik Naik
8a1be22849 Use unscoped instead of with_exclusive_scope for preloading 2010-01-20 16:11:14 +05:30
Pratik Naik
5502780c69 Move array_of_strings? to Relation 2010-01-20 14:01:42 +05:30
Pratik Naik
394c05ed82 Remove stale methods constructing joins 2010-01-20 13:24:53 +05:30
Pratik Naik
565b4cd3e0 Scope#find is no longer needed now that Relation#find handles all the cases 2010-01-20 03:40:37 +05:30
Pratik Naik
52ec4311f5 Delegate all finders to Relation 2010-01-20 03:35:25 +05:30
Pratik Naik
74e3539cda Ignore order for simple calculations to make postgresql happy 2010-01-20 02:17:49 +05:30
Pratik Naik
d8c30723aa Named scopes dont need count() now that Relation#count handles all the cases 2010-01-20 01:35:20 +05:30
Pratik Naik
1b78a3f8d5 with_scope no longer needs :reverse_merge 2010-01-20 01:29:18 +05:30
Pratik Naik
42553a98ea Remove find_with_associations and related code from associations now that Relation handles that stuff 2010-01-20 01:20:20 +05:30
Pratik Naik
9acf0af544 Remove Relation#where_clause 2010-01-19 23:11:54 +05:30
Pratik Naik
dbce07b81d Give preference to to_a over arel from Relation#method_missing 2010-01-19 22:52:08 +05:30
Pratik Naik
9465b84b54 Rename CalculationMethods to Calculations and get rid of the old Calculations module 2010-01-19 22:17:33 +05:30
Pratik Naik
8f63dcb648 Move the only remaining calculation method calculate() to Relation 2010-01-19 22:17:33 +05:30
Pratik Naik
ec63fdcff3 Get rid of construct_count_options_from_args 2010-01-19 20:43:03 +05:30
Pratik Naik
73b179eb68 Delegate count to Relation 2010-01-19 20:37:12 +05:30
Pratik Naik
9c7c7104f6 Fix the named scope equality check 2010-01-19 17:45:48 +05:30
Pratik Naik
4148c686ec Delegate :average, :minimum, :maximum, :sum to Relation 2010-01-19 15:50:47 +05:30
Pratik Naik
b9599502c9 Add Relation#construct_relation_for_association_calculations for calculations with includes 2010-01-19 15:22:09 +05:30
Pratik Naik
e6a68a5cc3 Add Relation#find_with_associations to load relation with eager loaded associations 2010-01-19 04:42:19 +05:30
Pratik Naik
9e7ec2a9f1 Simplify calculation scope building. Remove :order from associations as it is troublesome w/ calculation methods using postgresql. 2010-01-18 23:40:42 +05:30
Pratik Naik
3c4186b366 Remove construct_calculation_arel_with_included_associations because it's same as construct_finder_arel_with_included_associations 2010-01-18 23:40:42 +05:30
Pratik Naik
893524382a No need to pass current_scoped_methods to construct_calculation_arel everytime 2010-01-18 23:40:42 +05:30
José Valim
728db5a932 Rake tasks should load generators from new paths. 2010-01-18 18:22:55 +01:00
Joshua Peek
68b76a38eb Cleanup deprecation notices. 2010-01-18 09:49:38 -06:00
Paco Guzman
e27bfad6a5 Forgot to change named_scope to scope in an ArgumentError raise exception for duplication scopes related to commit d60bb0a9e4 [#3736 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-01-18 16:36:08 +01:00
José Valim
9fffdc5cdb Generators load path now will be Ruby load path. If you want to use rspec:install generator, you need generators/rspec/install_generator in your load path. 2010-01-18 16:21:11 +01:00
Pratik Naik
4c00c65c58 Simplify construct_finder_arel_* methods 2010-01-18 19:40:23 +05:30
Pratik Naik
2a2bc8e84a Handle invalid query IN() generated when a blank array is supplied in hash conditions 2010-01-18 18:56:55 +05:30
Pratik Naik
8bb5274648 Get rid of Relation#order_clauses 2010-01-18 18:56:55 +05:30
Pratik Naik
8ba2902dd4 Fix the named_scope deprecation notice 2010-01-18 18:56:55 +05:30
José Valim
40c4a0036a Ensure deprecated validate methods are invoked when they are private [#3214 status:resolved] 2010-01-18 09:56:36 +01:00
Pratik Naik
6ce538d485 Add missing CHANGELOG entry about relations as scopes 2010-01-18 04:42:04 +05:30
Pratik Naik
d60bb0a9e4 Rename named_scope to scope 2010-01-18 04:38:19 +05:30
Pratik Naik
e1d507c7fb Dont check for class equaity when merging relations 2010-01-18 04:28:21 +05:30
Pratik Naik
88de6b2de2 Inherit named scope class Scope from Relation 2010-01-18 04:24:24 +05:30
Pratik Naik
c6850d8361 Ensure that Scope#proxy_scope is always klass. Rename proxy_scope to klass too. 2010-01-18 00:03:18 +05:30