aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/table.rb
Commit message (Collapse)AuthorAgeFilesLines
* Raise custom error on empty joinDaniel Colson2017-01-171-1/+1
|
* Remove dead codeRafael Mendonça França2016-12-291-12/+0
|
* Don't store all aliases to a tableSean Griffin2016-09-131-6/+2
| | | | | | | The aliases property of a table is never used other than for equality. However, the aliases that have been created for a table aren't really something that should affect whether a table is considered to be the same table or not. This removal does not appear to have any affect within Active Record or within Arel.
* Allow a type caster to be given to the `Arel::Table` objectSean Griffin2014-12-291-4/+17
| | | | | | | | | This will allow most consuming code to avoid the deprecation introduced in 008445d6fd5f825d9b445ac75a7be67f0f7ab52c. The only code which will be affected is code that is building the `Arel::Table` object manually, rather than calling `arel_table` on an Active Record class. Hopefully this case will be rare enough that we don't need to introduce any additional APIs to work around it.
* Remove `engine` from `TreeManager` and subclassesSean Griffin2014-11-291-4/+3
| | | | | | This constructor parameter was unused for everything except the convenience methods `to_sql` and `where_sql`. We can pass the engine into those methods directly.
* Remove engine from the constructor arguments `Arel::Table`Sean Griffin2014-11-291-40/+21
| | | | | | | | | | | | | | | It is never used outside of convenience methods which are only used in tests. In practice, it just made constructing tables more complicated on the rails side. This is the minimum possible change to remove the constructor argument, but continue to have the tests passing. I'm not sure if we have a reason to keep `project` and friends, and the solution might actually just be to remove the engine from `SelectManager` and friends. As such I've held off on deleting those methods. We need to figure out what to do with `Table#from`. It's old invocation, which read `table.from(table)` was certainly nonsensical.
* Remove deprecated method "Table#primary_key"Sean Griffin2014-11-261-14/+0
| | | | | | | The only place this method was still used is on the MSSQL visitor. The visitor has all of the objects required to inline this lookup there. Since the `primary_key` method on the connection adapter will perform a query when called, we can cache the result on the visitor.
* Arel doesn't depend on activesupport and doesn't have "String#blank?"Vipul A M2014-06-011-1/+1
| | | | Remove usage of `.blank?` to match empty strings with a regular expression instead.
* Merge pull request #271 from jordansexton/patch-2Rafael Mendonça França2014-05-191-0/+8
|\ | | | | Added update and delete convenience methods
| * Added #update_manager and #delete_manager convenience methods for consistencyJordan Sexton2014-05-171-0/+8
| |
* | convenience method for outer_joinBrian Hahn2014-05-181-0/+4
|/
* Remove joins methodRafael Mendonça França2013-12-051-8/+0
|
* Merge pull request #196 from vipulnsward/remove_deprecatedRafael Mendonça França2013-11-091-21/+0
|\ | | | | Remove deprecated
| * Remove deprecated `Arel::Table#columns` with no replacementVipul A M2013-07-041-11/+0
| |
| * Remove deprecated `Arel::Table.table_cache` with no replacementVipul A M2013-07-041-10/+0
| |
* | Improve performance of #uniq across a large number of nodesSam2013-08-301-1/+4
|/
* ARel -> ArelXavier Noria2013-04-141-1/+1
| | | | | | | The project uses "Arel" most of the time, but there were a few "ARel" here and there. I checked with @brynary back in 2010 to pick one for the Rails documentation guidelines and "Arel" was chosen and documented. This patch chooses "Arel" vs "ARel" based on that.
* Add equality to ALL THE THINGS (that matter)Ernie Miller2012-08-181-0/+13
| | | | | | | | | | | | People are often trying to use ARel nodes inside ActiveRecord, and when they do so, lots of things can break, because ActiveRecord relies on Array#uniq and sometimes hash key equality to handle values that end up in wheres, havings, etc. By implementing equality for all the nodes, we should hopefully be able to prevent any nodes (even nodes containing other nodes) from failing an equality check they should otherwise pass, and alleviate many of these errors. Fixes #130
* bumping to 3.0.0Aaron Patterson2012-01-121-4/+4
|
* fixing the leg order of TableAlias nodesAaron Patterson2011-03-301-1/+1
|
* Add an #table_name method to Table and TableAlias, which always returns the ↵Jon Leighton2011-03-041-0/+3
| | | | actual table name, not the alias. Then fix ToSql#column_for to use this table name when checking whether the table exists (rather than before, where it was checking whether a table with the alias name exists, which was incorrect).
* sql literals may be used as column attributesAaron Patterson2010-12-221-1/+1
|
* adding a join source nodeAaron Patterson2010-12-141-1/+1
|
* fixing deprecation noticeAaron Patterson2010-12-131-2/+1
|
* deprecating Arel::Table#primary_keyAaron Patterson2010-12-131-0/+6
|
* adding a join factory method on the select managerAaron Patterson2010-12-071-3/+4
|
* only break backwards compatibility in major releasesAaron Patterson2010-12-031-3/+3
|
* declawing connection from the Table classAaron Patterson2010-12-031-10/+8
|
* attributes do not need a column memberAaron Patterson2010-12-031-6/+8
|
* deprecating "insert"Aaron Patterson2010-12-021-0/+4
|
* deprecating the "joins" methodAaron Patterson2010-11-301-0/+4
|
* make table aliases cheaper to allocateAaron Patterson2010-11-241-2/+2
|
* Fix a bit the initialization of TableIvan Ukhov2010-11-171-1/+1
|
* Let table_exists? find tables in @@table_cache even if symbols are passed as ↵Ivan Ukhov2010-11-171-2/+2
| | | | their names
* adding default limits when there is an offset for sqlite and mysql [#5316 ↵Aaron Patterson2010-10-201-0/+4
| | | | state:resolved]
* Fisting arel specs -- still needs tree_manager and cleanupRyan Davis2010-10-181-5/+1
|
* Created syntactic sugar Table(...) methodSnuggs2010-10-161-1/+5
|
* refactoring join_sql to return nil if there are no sourcesAaron Patterson2010-09-281-11/+10
|
* making select manager publicAaron Patterson2010-09-281-1/+2
|
* pass primary key name and value to ActiveRecord adapter insert methodRaimonds Simanovskis2010-09-281-1/+5
| | | | necessary for Oracle adapter for RETURNING ... INTO ... clause generation
* these readers should be accessorsAaron Patterson2010-09-271-1/+1
|
* changing method name to be more clearAaron Patterson2010-09-271-11/+11
|
* moving visitors aroundAaron Patterson2010-09-231-2/+2
|
* ignoring aliasAaron Patterson2010-09-231-1/+1
|
* constructor can take column infoAaron Patterson2010-09-211-8/+19
|
* returning nil for tables that do not existAaron Patterson2010-09-181-0/+16
|
* Revert "Table#[] returns nil when table does not exist"Aaron Patterson2010-09-151-2/+0
| | | | This reverts commit e460aa96ae9bd5f1a24d798b2d22984a54810c70.
* Table#[] returns nil when table does not existAaron Patterson2010-09-151-0/+2
|
* adding an EXISTS node, update method will generate an IN clauseAaron Patterson2010-09-141-0/+5
|
* using table_alias when :as is passed to the constructorAaron Patterson2010-09-121-0/+5
|