aboutsummaryrefslogtreecommitdiffstats
path: root/test/nodes
Commit message (Collapse)AuthorAgeFilesLines
* added Casted#hashBert Bruynooghe2016-02-171-0/+16
|
* * Support for bitwise operations as infix operators. Tests included.Shahbaz Javeed2016-01-061-0/+39
| | | | | | | | | | | | | | | | | | | | | | *** Individual commit messages included below *** * Preliminary support for bitwise operations as infix operators. Tests to follow. * Added bitwise xor, shift left and shift right operators * Fixed the BitwiseOr class so it uses the :| operator instead of :& * All the methods for the bitwise operators in the Arel::Math module now wrap them up in Arel::Nodes::Grouping so the operation becomes isolated like addition and subtraction * Preliminary set of tests for the new operators * Updated README with examples of bitwise operations * Added a new UnaryOperation class which is a riff on the InfixOperation class * Added tests for UnaryOperation (inspired by InfixOperation tests) * Added the bitwise not (~) operator as a UnaryOperation * Added tests for the bitwise not operator * Added documentation for the bitwise not operator * Updated gemspec using `rake arel.gemspec`
* Implement CASE Conditional ExpressionFelix Bünemann2016-01-051-0/+82
|
* Add OrderPredications back into Nodes::Function (removed with deprecation of ↵Carson Reinke2015-07-231-0/+9
| | | | Expression)
* Fix a typo in the sql literal spec for grouped "and" equalityCourtland Caldwell2015-03-231-1/+1
|
* Change the interface of `having` to match that of `where`Sean Griffin2015-01-271-4/+4
| | | | | | 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.
* Implement equality for `BindParam`Sean Griffin2015-01-251-0/+15
| | | | | It is impossible to test equality of things constructing trees with bind params otherwise.
* Remove `engine` from `TreeManager` and subclassesSean Griffin2014-11-291-7/+0
| | | | | | 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-7/+6
| | | | | | | | | | | | | | | 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.
* Binary nodes should not generate the same hash as nodes of other classesSean Griffin2014-10-241-0/+26
|
* `Extract#as` should not mutate the receiverTamir Duberstein2014-09-131-0/+8
| | | | Fixes https://github.com/rails/rails/issues/16913
* Windowing support for PARTITION BY clause.Alexander Staubo2014-06-201-3/+9
|
* - Fix ambiguous argument warningVipul A M2014-05-311-1/+1
| | | | - Fix typo: `test_opertaion_ordering` => `test_operation_ordering`
* fixing BINARY testsAaron Patterson2014-04-081-2/+2
|
* fixing select core testsAaron Patterson2014-04-081-7/+7
|
* fixing sql_literal testsAaron Patterson2014-04-081-5/+9
|
* add the casting node to the AST at build timeAaron Patterson2014-03-243-3/+3
| | | | | 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-6/+0
|
* Bump minitest to 5.1.Vipul A M2014-01-047-7/+7
|
* Add :encode_with for proper YAML serializationIvan Antropov2013-11-091-0/+8
|
* Add equality to ALL THE THINGS (that matter)Ernie Miller2012-08-1826-2/+514
| | | | | | | | | | | | 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
* Add Nodes::TableAlias#engineJon Leighton2012-07-131-0/+16
| | | | | Eventually #engine should go away, but until that time, this means that Table and Nodes::TableAlias can be used more interchangeably.
* Include Predications in GroupingErnie Miller2012-05-191-0/+13
| | | | | | Also, removed unused ordering.rb file, since it is identical to the one being created in unary.rb already, and isn't required anywhere.
* Must support aliases for OVER operator.Alexander Staubo2012-02-231-0/+9
|
* Add #extract, which produces ANSI SQL function EXTRACT(<field> from <expr>).Alexander Staubo2012-02-231-0/+19
|
* Support ANSI SQL2003 window functions.Alexander Staubo2012-02-221-0/+40
|
* bind parameters can be differentiated from sql literalsAaron Patterson2012-02-201-0/+1
|
* Make it the responsibility of the connection to hold on to a visitor for ↵Jon Leighton2011-08-083-13/+12
| | | | generating SQL, rather than the TreeManager. (There is a related commit coming in Active Record.)
* Break Ordering into Ascending/Descending nodes, allow reversalErnie Miller2011-06-153-2/+70
|
* Include Arel::Predicates to Arel::Nodes::Function so you can do ↵Samuel Kadolph2011-05-271-0/+9
| | | | table[:id].count.eq(2)
* InfixOperations are valid value expressions per SQL99 BNF, andErnie Miller2011-05-021-0/+30
| | | | should support ordering
* Move #as to AliasPredication, stop overriding Function's #as.Ernie Miller2011-04-291-0/+17
|
* adding a DISTINCT nodeAaron Patterson2011-04-211-14/+23
|
* adding a Bin node to emit mysql BINARY keywordsAaron Patterson2011-04-111-0/+23
|
* Make as factory method convert alias name to SqlLiteralErnie Miller2011-03-121-0/+6
|
* Fix #not to stop wrapping in a grouping nodeErnie Miller2011-02-111-7/+4
|
* Added Arel::Nodes::NamedFunction for representing generic SQL functionsAaron Patterson2011-01-042-0/+14
|
* adding factory methods to node base classAaron Patterson2010-12-141-0/+4
|
* adding node testAaron Patterson2010-11-301-0/+33
|
* fixing warningsAaron Patterson2010-11-291-1/+1
|
* adding an AS nodeAaron Patterson2010-11-231-0/+16
|
* adding a "not" factory method for creating Not nodesAaron Patterson2010-11-231-0/+20
|
* Refactor predication methods to be available to SqlLiterals as well.Ernie Miller2010-10-271-0/+24
|
* renaming test_helper to helper so that it is not double requiredAaron Patterson2010-10-1810-10/+10
|
* got rid of retarded check method. down with rspecRyan Davis2010-10-182-12/+12
|
* Renamed spec_helper to test_helperRyan Davis2010-10-1810-10/+10
|
* Fisting arel specs -- still needs tree_manager and cleanupRyan Davis2010-10-1810-0/+239