aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/engines/sql/relations
Commit message (Collapse)AuthorAgeFilesLines
* Moved adding of limit on deletion and adding of limit on update conditions ↵Praveen Devarao2010-02-252-5/+8
| | | | | | to GenericCompiler, to provide flexibility to handle db specifics Signed-off-by: Emilio Tagua <miloops@gmail.com>
* Refactored primary_key to look up for the real primary_key and cache it.Emilio Tagua2010-02-191-4/+5
|
* Insertions should use insert and not execute to get a valid returningEmilio Tagua2010-02-183-26/+29
| | | | value. Moved clasuses to Arel::Relation.
* Fixed compiler require.Emilio Tagua2010-02-181-1/+1
|
* Added support for RETURNING primary key when available, only forEmilio Tagua2010-02-182-1/+6
| | | | PostgreSQL.
* Moved primary_key to relation, send pk to engine, to build a betterEmilio Tagua2010-02-182-7/+10
| | | | query if possible.
* Move update conditions with limit logic into compilers.Emilio Tagua2010-02-162-10/+12
|
* If a compiler is not found for the current adapter, use the generic one.Emilio Tagua2010-02-161-1/+5
|
* Move using_distinct_on? to PostgreSQL compiler. Extract order tweakingEmilio Tagua2010-02-161-4/+0
| | | | to a new method.
* Extract SQL logic from Arel::Relation into compilers.Emilio Tagua2010-02-154-73/+78
|
* Table alias should be considered when checking for equalityPratik Naik2010-01-121-2/+3
|
* Make sure not to use alias if it's same as the table namePratik Naik2010-01-121-1/+1
|
* Add support for table aliasingPratik Naik2010-01-011-3/+15
| | | | | | | Example : users = Table(:users, :as => :accounts) users.to_sql => SELECT `accounts`.`id`, `accounts`.`name` FROM `users` AS `accounts`
* Remove every new line when generating queries, this may build invalid ↵Emilio Tagua2009-12-312-5/+5
| | | | queries on SQLite.
* Added having to use in combination with group to filter records.Emilio Tagua2009-12-281-0/+6
|
* Don't try to lock reads when using any SQLite adapter, it's redundantEmilio Tagua2009-12-281-1/+1
| | | | and may generate an invalid query.
* Added lock to Arel, allowing a locking read if required.Emilio Tagua2009-12-271-2/+4
|
* Don't split sql logging across multiple lines.Emilio Tagua2009-12-271-1/+1
|
* Added "from" method, allowing to specify custom from clauses.Emilio Tagua2009-12-271-2/+6
|
* Don't split sql logging across multiple lines.Emilio Tagua2009-12-261-1/+1
|
* Ruby 1.9: Array#to_s behaves like inspect now, so we don't want to use it ↵Bryan Helmkamp2009-11-101-1/+1
| | | | here (needs spec!)
* Ruby 1.9: Sort attributes deterministically so specs always passBryan Helmkamp2009-11-091-3/+19
|
* Removing unused params from #to_sql methods on writesBryan Helmkamp2009-10-011-3/+4
|
* WhitespaceBryan Helmkamp2009-09-301-9/+9
|
* Allow joining a StringJoin with another join relation.Emilio Tagua2009-08-141-2/+2
|
* Allow SQL strings to insert query. Insert should better return engine's result.Emilio Tagua2009-07-011-3/+8
|
* If the class or method isn't defined use "id" as primary_key.Emilio Tagua2009-06-231-1/+6
|
* Build valid SQL query when using PostreSQL with given order and DISTINCTEmilio Tagua2009-06-231-0/+24
| | | | ON clause. TODO: refactoring to clean up components.
* Build valid SQL query for SQLite3 and PostgreSQL when updating records with ↵Emilio Tagua2009-06-231-2/+18
| | | | limited conditions
* Allow strings as update assignmentsEmilio Tagua2009-06-101-3/+7
|
* Expand usages of #hash_on. The #hash definition it produces looks broken, ↵Bryan Helmkamp2009-05-181-1/+8
| | | | but leaving it for now
* Extracting #build_query method for creating SQL from partsBryan Helmkamp2009-05-173-16/+25
|
* Refactor #select_sql. Extract methods to generate clausesBryan Helmkamp2009-05-171-7/+27
|
* WhitespaceBryan Helmkamp2009-05-179-9/+9
|
* initial implementation of cross-engine joinBryan Helmkamp2009-05-171-0/+4
| | | | | | | Conflicts: lib/arel/engines/memory/relations/array.rb lib/arel/engines/sql/primitives.rb
* using in memory relations as results from sql relationNick Kallen2009-05-171-1/+1
| | | | | | | Conflicts: lib/arel/algebra/primitives/expression.rb lib/arel/algebra/relations/relation.rb
* most in memory operations save join and groupBryan Helmkamp2009-05-171-1/+1
| | | | | | | | | | | | | Conflicts: lib/arel/algebra/extensions/object.rb lib/arel/algebra/primitives/value.rb lib/arel/engines/memory/relations.rb lib/arel/engines/sql/formatters.rb lib/arel/engines/sql/primitives.rb spec/arel/unit/relations/alias_spec.rb spec/arel/unit/relations/array_spec.rb spec/arel/unit/relations/order_spec.rb
* moved table-related stuff into sql engineNick Kallen2009-05-171-0/+6
|
* join sql stuff moved into sql adapterBryan Helmkamp2009-05-171-0/+14
| | | | | | | | | Conflicts: lib/arel/algebra/primitives/value.rb lib/arel/algebra/relations/operations/join.rb lib/arel/algebra/relations/relation.rb spec/arel/unit/relations/join_spec.rb
* consolidated filesBryan Helmkamp2009-05-174-38/+36
| | | | | | | | | | | | | | Conflicts: lib/arel/algebra/predicates.rb lib/arel/algebra/relations/writes/delete.rb lib/arel/algebra/relations/writes/insert.rb lib/arel/algebra/relations/writes/update.rb lib/arel/engines/memory/predicates.rb lib/arel/engines/memory/relations.rb lib/arel/engines/sql/primitives/attribute.rb lib/arel/engines/sql/relations/writes/insert.rb lib/arel/engines/sql/relations/writes/update.rb
* reorganized file structuresBryan Helmkamp2009-05-174-8/+5
| | | | | | | | | | Conflicts: lib/arel.rb lib/arel/arel.rb lib/arel/engines/memory/predicates.rb lib/arel/engines/memory/relations/array.rb lib/arel/engines/sql/relations/table.rb
* moved sql related code to its own engine areaBryan Helmkamp2009-05-1713-0/+167
Conflicts: lib/arel/engine.rb lib/arel/extensions/object.rb lib/arel/predicates.rb lib/arel/primitives/attribute.rb lib/arel/primitives/expression.rb lib/arel/primitives/value.rb lib/arel/relations/operations/join.rb lib/arel/relations/relation.rb lib/arel/relations/utilities/externalization.rb lib/arel/relations/utilities/nil.rb lib/arel/relations/writes/delete.rb lib/arel/relations/writes/insert.rb lib/arel/relations/writes/update.rb spec/arel/unit/relations/skip_spec.rb spec/arel/unit/relations/take_spec.rb spec/spec_helper.rb