aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_select_manager.rb
Commit message (Collapse)AuthorAgeFilesLines
* Delegate to Connection Visitor in WhereSQL VisitorEdward Paget2015-12-171-0/+21
| | | | | | | | | | | | The WhereSQL visitor always uses the generic ToSQL visitor to create the where clause sql statement. This means that it'll miss database specific statements, such as 'ILIKE' in PostgreSQL. Since the `#where_sql` method is mainly used for ActiveRecord error reporting, this discrepancy could be confusing to users. This patch changes the WhereSQL visitor to use the its connection visitor to generate SQL for each statement in the SelectManager's wheres array. Then lets them be joined together with ' AND '.
* Fix visit_Arel_Nodes_FullOuterJoin and visit_Arel_Nodes_RightOuterJoin to ↵evgenim2015-03-161-0/+30
| | | | make them work with collectors.
* Change the interface of `having` to match that of `where`Sean Griffin2015-01-271-5/+5
| | | | | | These two clauses have nearly identical semantics with regards to how they would be constructed as an AST. It doesn't make sense for their interfaces to be separate.
* Remove `engine` from `TreeManager` and subclassesSean Griffin2014-11-291-96/+96
| | | | | | 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-16/+16
| | | | | | | | | | | | | | | 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.
* Deprecate passing ranges to `#in` and `#not_in`Sean Griffin2014-10-251-4/+2
| | | | | | | The goal of these methods should be to generate in nodes, not handle every possible permutation of more than one value. The `#between` and `#not_between` methods have been extracted, which better represent the semantics of handling ranges in SQL.
* Add SelectManager#distinct_on to set/unset Arel::Nodes::DistinctOn quantifierMax Holder2014-08-301-0/+21
|
* Merge pull request #291 from vipulnsward/rename-testRafael Mendonça França2014-06-301-52/+53
|\ | | | | Cleanup SelectManager Test
| * - Stop passing redundant `:engine => Table.engine` to `Table#new`Vipul A M2014-06-151-51/+52
| | | | | | | | | | | | | | | | - Remove redundant `ast` variable creation - Rename similar join tests name to what they actually test - Move "joins itself" test to "joins" describe instead of defining describe block twice - Move update manager statement tests in logical order - Move `project` tests in logical order
| * Rename ambiguous test name to what it actually testsVipul A M2014-06-151-1/+1
| |
* | Add test for window + partition + order.Alexander Staubo2014-06-221-0/+11
| |
* | Windowing support for PARTITION BY clause.Alexander Staubo2014-06-201-0/+30
|/
* Add test for non-recursive WITH statementJiri Pospisil2014-06-121-0/+14
|
* Merge pull request #272 from jduff/rebased_outer_joinRafael Mendonça França2014-05-191-0/+22
|\ | | | | Add convenience #outer_join
| * convenience method for outer_joinBrian Hahn2014-05-181-0/+22
| |
* | Return self from #distinct so it's chainableJordan Sexton2014-05-171-0/+6
|/
* more select manager tests passingAaron Patterson2014-04-081-1/+2
|
* removing unused join_sql methodAaron Patterson2014-04-081-12/+5
|
* remove order_clauses since we do not use itAaron Patterson2014-04-081-10/+0
|
* Added right and full outer joinsStephen Prater & Fire-Dragon-DoL2014-03-301-0/+16
|
* add the casting node to the AST at build timeAaron Patterson2014-03-241-2/+2
| | | | | If we add the casting node to the ast at build time, then we can avoid doing the lookup at visit time.
* Remove deprecated Arel::ExpressionRafael Mendonça França2014-02-101-12/+0
|
* Remove deprecated Arel::SqlLiteralRafael Mendonça França2014-02-101-10/+10
|
* add bind values to the manager classAaron Patterson2014-01-141-0/+7
|
* Merge pull request #234 from aackerman/remove-test-engine-proxyRafael Mendonça França2014-01-041-68/+8
|\ | | | | Removed EngineProxy in SelectManager tests
| * Removed EngineProxy in SelectManager testsAaron Ackerman2014-01-041-68/+8
| |
* | Assert that SelectManager#project accepts a raw StringAaron Ackerman2014-01-041-4/+2
|/
* Remove deprecated calls from the testsRafael Mendonça França2013-12-051-6/+6
|
* explicitly pass the pk to compile_updateAaron Patterson2013-11-161-6/+6
|
* Remove deprecated calls to `SelectManage#insert` with preference to using ↵Vipul A M2013-11-101-14/+0
| | | | `compile_insert`
* Remove some test warningsCarlos Antonio da Silva2012-11-171-3/+0
|
* more roflscaling strings in the visitorAaron Patterson2012-10-121-2/+2
|
* GH-138: add Arel::SelectManager#projections methodSuraj N. Kurapati2012-09-211-0/+8
|
* Support ANSI SQL2003 window functions.Alexander Staubo2012-02-221-0/+156
|
* Add SelectManager#distinct to set/unset the Arel::Nodes::Distinct.new quantifierJon Leighton2011-11-041-0/+13
|
* Removed trailing space on the test sql string statement.Joel Bryan Juliano2011-10-311-1/+0
|
* Added a failing test for a non-table alias as rhs relation nameJoel Bryan Juliano2011-10-311-0/+18
|
* Support locking by default and disable it only for SQLite.Edgars Beigarts2011-08-261-1/+1
|
* Add SelectManager#source method to get the source of the ctxJon Leighton2011-08-111-0/+8
|
* Add SelectManager#projections= method to overwrite projectionsJon Leighton2011-08-111-0/+9
|
* Make it the responsibility of the connection to hold on to a visitor for ↵Jon Leighton2011-08-081-0/+4
| | | | generating SQL, rather than the TreeManager. (There is a related commit coming in Active Record.)
* fix depth first visitor to support ascending and descending nodesAaron Patterson2011-06-291-0/+9
|
* do not cache sql literal valuesAaron Patterson2011-05-171-1/+1
|
* Add support for ordering on expressionsArthur Taylor2011-04-281-0/+23
| | | | | | | | | | | | | | Conflicts: lib/arel.rb lib/arel/attributes/attribute.rb lib/arel/nodes/infix_operation.rb lib/arel/nodes/named_function.rb Conflicts: lib/arel.rb lib/arel/attributes/attribute.rb
* adding Distinct ON nodeAaron Patterson2011-04-211-1/+1
|
* adding a spec to demonstrate subqueriesAaron Patterson2011-04-181-0/+12
|
* fixing Table testsAaron Patterson2011-04-181-1/+1
|
* Fixed deep copy bug in SelectManager cloneArthur Taylor2011-04-191-0/+10
|
* use TableAlias nodes for aliasing subselectsAaron Patterson2011-03-301-1/+1
|
* Make SelectManager#as act like node predicationsJohn Mileham2011-03-251-2/+18
|