aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/query_methods.rb
Commit message (Collapse)AuthorAgeFilesLines
* fix activerecord query_method regression with offset into FixnumDenis Jean2012-03-121-1/+1
| | | | | | add test to show offset query_methods on mysql & mysql2 change test to cover public API
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-02-091-2/+2
|\ | | | | | | | | Conflicts: activerecord/lib/active_record/relation/query_methods.rb
| * use appropriate words for docs of Model.noneRohit Arondekar2012-02-071-2/+2
| |
| * minor tidy up of none relation query methodRohit Arondekar2012-02-061-2/+2
| |
| * Fix code example in ActiveRecord::Relation#noneCarlos Antonio da Silva2012-02-011-3/+3
| |
* | document the AR none method [ci skip]Vijay Dev2012-02-011-7/+7
|/
* Added `none` query method to return zero records.Juanjo Bazán2012-01-311-0/+33
| | | And added NullRelation class implementing the null object pattern for the `Relation` class.
* select doesn't take multiple arguments - fixes #4539 [ci skip]Vijay Dev2012-01-191-5/+5
| | | | | Also, fixed the bit about returning AM::MissingAttributeError. This seems to be fixed earlier in 3-2-stable only.
* infer references from Relation#orderJon Leighton2012-01-161-1/+7
|
* store references as a stringJon Leighton2012-01-161-1/+1
|
* automatically add references when we canJon Leighton2012-01-161-1/+3
|
* Add ActiveRecord::Relation#references (#950)Jon Leighton2012-01-161-1/+19
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-01-111-0/+10
|\
| * add documentation explaining reorder behaviorMatt Jones2012-01-091-0/+10
| |
* | correctly handle order calls after a reorderMatt Jones + Scott Walker2012-01-031-3/+4
|/
* Add ActiveRecord::Relation#uniq for toggling DISTINCT in the SQL queryJon Leighton2011-11-051-6/+24
|
* copy edits 908f2616Vijay Dev2011-09-201-4/+4
|
* Document ActiveRecord::QueryMethods#selectRyan Bigg2011-09-171-0/+29
|
* minor editVijay Dev2011-09-141-1/+1
|
* Add documentation for the extending method in ActiveRecord:QueryMethodsRyan Bigg2011-09-141-0/+36
|
* Revert "Fixes bug in ActiveRecord::QueryMethods, #1697"Jon Leighton2011-09-041-2/+4
| | | | | | This reverts commit 0df27c98d982ec87d2fb48cfda82694eb267993e. Reverted due to failing test, see #2845.
* Fixes bug in ActiveRecord::QueryMethods, #1697Joshua Wehner2011-08-311-4/+2
| | | Replace split on comma with a regexp that will reverse all ASC/DESC specifically
* The join_nodes must be passed to the JoinDependency initializer and ↵Jon Leighton2011-08-291-7/+2
| | | | therefore counted by the alias tracker. This is because the association_joins are aliased on initialization and then the tables are cached, so it is no use to alias the join_nodes later. Fixes #2556.
* Revert "Merge pull request #2309 from smasry/master"Jon Leighton2011-07-281-1/+1
| | | | | | | This reverts commit 9d396ee8195e31f646e0b89158ed96f4db4ab38f, reversing changes made to fa2bfd832c1d1e997d93c2269a485cc74782c86d. Reason: the change broke the build.
* Reverse order fix when using function for ActiveRecord::QueryMethods Fixes #1697Samer Masry2011-07-271-1/+1
|
* Revert "allow select to have multiple arguments"Piotr Sarnacki2011-07-261-6/+3
| | | | | | | This reverts commit 04cc446d178653d362510e79a22db5300d463161. I reverted it because apparently we want to use: select([:a, :b]) instead of select(:a, :b), but there was no tests for that form.
* allow select to have multiple argumentsSławosz Sławiński2011-07-261-3/+6
|
* Ordering with extra spaces was raising a SQL exceptionFranck Verrot2011-07-241-0/+1
|
* fix AR having() not to raise NoMethodError when the given argument does not ↵Akira Matsuda2011-07-091-3/+3
| | | | | | respond to empty? having raises NoMethodError: undefined method `empty?' when a Fixnum or Date/Time were passed via varargs
* Remove case statement changes from 2e0840d and 56ac32a. Inheritance FTW.Ernie Miller2011-07-061-1/+1
|
* Fix caseOriol Gual2011-06-281-2/+1
|
* Update reverse order with new Arel NodesOriol Gual2011-06-281-1/+2
|
* default create_with_value to a hash so we can eliminate conditionals, add ↵Aaron Patterson2011-06-271-1/+1
| | | | test surrounding create_with(nil) behavior
* Support reversal of ARel orderings in reverse_sql_orderErnie Miller2011-06-201-3/+12
|
* Fix issue #1272Brian Mathiyakom2011-06-011-8/+7
| | | | | Set reverse_order_value when asked to reverse_order(). Do the actual reversal in build_arel.
* Evaluate default scopes at the last possible moment in order to avoid ↵Jon Leighton2011-04-121-4/+10
| | | | problems with default scopes getting included into other scopes and then being unable to remove the default part via unscoped.
* Bring #reorder backSebastian Martinez2011-03-281-0/+4
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Resolve some TODO comments which I decided did not need anything doneJon Leighton2011-03-121-1/+0
|
* Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-041-37/+41
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/class_methods/join_dependency.rb activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb activerecord/lib/active_record/associations/has_many_association.rb activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/lib/active_record/associations/has_one_association.rb activerecord/lib/active_record/associations/has_one_through_association.rb activerecord/lib/active_record/associations/through_association_scope.rb activerecord/lib/active_record/reflection.rb activerecord/test/cases/associations/has_many_through_associations_test.rb activerecord/test/cases/associations/has_one_through_associations_test.rb activerecord/test/cases/reflection_test.rb activerecord/test/cases/relations_test.rb activerecord/test/fixtures/memberships.yml activerecord/test/models/categorization.rb activerecord/test/models/category.rb activerecord/test/models/member.rb activerecord/test/models/reference.rb activerecord/test/models/tagging.rb
| * Move JoinDependency and friends from ↵Jon Leighton2011-02-281-2/+2
| | | | | | | | ActiveRecord::Associations::ClassMethods to just ActiveRecord::Associations
| * use an attribute rather than a SQL literalAaron Patterson2011-02-261-1/+1
| |
| * explicitly allowing lolqueriesAaron Patterson2011-02-161-10/+1
| |
| * limit() should sanitize limit valuesAaron Patterson2011-02-081-1/+1
| | | | | | | | This fixes CVE-2011-0448
| * ActiveRecord::Relation#primary_key should return a string, just like ↵Jon Leighton2011-01-031-1/+1
| | | | | | | | ActiveRecord::Base.primary_key does.
| * Make Relation#create_with always merge rather than overwrite, not just when ↵Jon Leighton2011-01-031-1/+1
| | | | | | | | merging two relations. If you wish to overwrite, you can do relation.create_with(nil), or for a specific attribute, relation.create_with(:attr => nil).
| * ActiveRecord::Base.joins should allow single nil argument [#6181 state:resolved]Piotr Sarnacki2010-12-161-1/+1
| |
| * make sure that join nodes are uniqAaron Patterson2010-12-161-1/+1
| |
| * supporting arel AST nodes when building join statementsAaron Patterson2010-12-161-3/+15
| |
| * bucketing based on join typeAaron Patterson2010-12-161-8/+17
| |
| * taking advantage of the JoinSource node in the SQL ASTAaron Patterson2010-12-161-16/+7
| |