aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/join_dependency/join_base.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Active Record] require => require_relativeAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts 9d4f79d3d394edb74fa2192e5d9ad7b09ce50c6d
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Fix `JoinDependency` with using a custom tableRyuta Kamizono2017-07-181-4/+7
| | | | | | | | | | | | | | | Without this fix, `JoinDependency` doesn't use a custom table alias: ``` % ARCONN=sqlite3 be ruby -w -Itest test/cases/relations_test.rb -n test_using_a_custom_table_with_joins_affects_the_wheres Using sqlite3 Run options: -n test_using_a_custom_table_with_joins_affects_the_wheres --seed 14531 E Error:RelationTest#test_using_a_custom_table_with_joins_affects_the_wheres: ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: posts.author_id: SELECT "omg_posts".* FROM "posts" "omg_posts" INNER JOIN "authors" ON "authors"."id" = "posts"."author_id" WHERE "omg_posts"."title" = ? LIMIT ? ```
* Remove useless `aliased_table_name` in `JoinDependency`Ryuta Kamizono2017-07-151-4/+0
| | | | If `table.table_alias` is not nil, it is enough to use `table` simply.
* [Active Record] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* applies new string literal convention in activerecord/libXavier Noria2016-08-061-1/+1
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Merge branch 'master' into joindepAaron Patterson2013-10-151-1/+1
|\ | | | | | | | | | | | | | | | | | | | | * master: use the cached arel table Fix typo in the changelog entry Don't remove the select values to add they back again Pluck on NullRelation accepts a list of columns Conflicts: activerecord/lib/active_record/relation/finder_methods.rb
| * use the cached arel tableAaron Patterson2013-10-151-1/+1
| |
* | move column_names_with_alias on to the alias cache objectAaron Patterson2013-10-141-4/+0
| |
* | pull parent and alias tacker from the nodes.Aaron Patterson2013-10-111-4/+0
|/ | | | For now, we'll set the tables on the nodes manually.
* make node search more efficientAaron Patterson2013-10-091-0/+5
| | | | | | Rather than search every node in the tree, comparing that node and all of its parents every time, start at the root from both sides and work our way down the tree
* remove == so we can see where walking up parents occursAaron Patterson2013-10-091-5/+0
|
* push parent up to the superclassAaron Patterson2013-10-091-0/+4
| | | | We always want a linked list back to the root node.
* require the files we need so the classes are stand-aloneAaron Patterson2013-10-031-0/+2
|
* changed variable name active_record => base_klassNeeraj Singh2013-04-091-2/+2
| | | | | | | | | | | | | | | | | Current code stores the klass name in active_record and this is used throughout. While reviewing the code time and again I had the mental picture of active_record being an instance of a klass. However here the actual klass is being stored in @active_record. Secondly at two different places while referring to @active_record the comment refers to it as base klass. All this points to active_record being not the best variable name. So I thought it is better to replace active_record with base_klass. This change is confined to JoinDependency, JoinBase, JoinPart and JoinAssociation - all joining related work.
* Move JoinDependency and friends from ↵Jon Leighton2011-02-281-0/+24
ActiveRecord::Associations::ClassMethods to just ActiveRecord::Associations