aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/querying.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* remove AR auto-explain (config.auto_explain_threshold_in_seconds)Yves Senn2013-02-241-14/+10
| | | | | | | | | | We discussed that the auto explain feature is rarely used. This PR removes only the automatic explain. You can still display the explain output for any given relation using `ActiveRecord::Relation#explain`. As a side-effect this should also fix the connection problem during asset compilation (#9385). The auto explain initializer in the `ActiveRecord::Railtie` forced a connection.
* Refactor to use each_key, remove extra spacesCarlos Antonio da Silva2013-01-281-1/+0
|
* Cleans and removes 'Examples' tag [ci skip]Alvaro Pereyra2012-12-011-5/+2
|
* Add Relation#find_or_create_by and friendsJon Leighton2012-10-191-0/+1
| | | | | | | This is similar to #first_or_create, but slightly different and a nicer API. See the CHANGELOG/docs in the commit. Fixes #7853
* Remove ActiveRecord::Base.to_aJon Leighton2012-08-031-1/+1
| | | | | On reflection, it seems like a bit of a weird method to have on ActiveRecord::Base, and it shouldn't be needed most of the time anyway.
* load active_support/deprecation in active_support/railsXavier Noria2012-08-021-1/+0
|
* load active_support/core_ext/module/delegation in active_support/railsXavier Noria2012-08-021-1/+0
|
* ActiveRecord::Base.all returns a Relation.Jon Leighton2012-07-271-7/+7
| | | | | | | | | | | Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway.
* Log query plan when we use count_by_sql method.kennyj2012-07-181-2/+4
|
* Introducing `take` as a replacement to the old behavior of `first`Marcelo Silveira2012-05-021-1/+1
|
* Fix PR #6091Andrew White2012-04-301-1/+1
| | | | | | 1. ActiveRecord::Base is not ActiveRecord::Relation 2. The order of records from an SQL query is uncertain without an ORDER clause 3. Run your own tests when submitting a pull request
* Add Relation#find_by and Relation#find_by!Jon Leighton2012-03-301-0/+1
|
* column types are passed from the result set to the instantiated AR objectAaron Patterson2012-02-071-1/+10
|
* Merge pull request #4805 from xuanxu/none_and_null_object_patternJon Leighton2012-01-311-1/+1
|\ | | | | Added `none` query method to return zero records.
| * Added `none` query method to return zero records.Juanjo Bazán2012-01-311-1/+1
| | | | | | And added NullRelation class implementing the null object pattern for the `Relation` class.
* | always return the result set from select_allAaron Patterson2012-01-311-1/+1
| |
* | made the result set object act more like an arrayAaron Patterson2012-01-311-1/+2
|/
* Add ActiveRecord::Relation#references (#950)Jon Leighton2012-01-161-1/+1
|
* Split out most of the AR::Base code into separate modules :cake:Jon Leighton2011-12-151-0/+58