aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/nodes.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Merge pull request #482 from kirs/multiple-insert"Rafael Mendonça França2017-05-041-1/+0
| | | | | | | This reverts commit 6d105c7f891a14316eab47dfff3bf1b94f3204e7, reversing changes made to 437aa3a4bb8ad4f3f4eba299dbb1112852f9c7ac. This broke Active Record when the values are sql literals
* Support multiple insertsKir Shatrov2017-05-011-0/+1
|
* Enable frozen_string_literal in all files in arelRafael Mendonça França2017-02-131-0/+1
|
* * Support for bitwise operations as infix operators. Tests included.Shahbaz Javeed2016-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | *** 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/+3
|
* Add case sensitive regexpKeenan Brock2015-12-051-0/+1
| | | | | | | Explicitly declare if this is case sensitive or not currently postgres assumes case insensitive regexp no other databases support regexps
* Move casted to its own fileVipul A M2015-05-311-40/+1
|
* Allow a type caster to be given to the `Arel::Table` objectSean Griffin2014-12-291-11/+0
| | | | | | | | | 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.
* Deprecate automatic type casting within ArelSean Griffin2014-12-261-0/+11
| | | | | | | | Rails now performs all casting eagerly, before passing the value into Arel. Once we remove this, the code on both sides will be simplified greatly. Ideally, we can provide the appropriate public APIs on the Rails side to ease this transition for library authors who depend on this behavior.
* 💣Sean Griffin2014-12-041-1/+1
| | | | `nil?` not `nil`
* Quoted nodes respond to `nil?` in the same way as `Casted` nodesSean Griffin2014-12-041-0/+1
|
* Quoted nodes respond to the same method as Casted nodesSean Griffin2014-12-041-0/+1
| | | | We need to be able to not care which we've gotten in ActiveRecord
* Don't re-quote nodes which are already quotedSean Griffin2014-12-021-1/+1
| | | | | | | | We're going to start working on removing type casting from arel. To avoid doing one gigantic commit which moves everything over to eager casting, we need a way to tell Arel that we've already cast it. The easiest path to that is to give it a quoted node, and then we remove this case once we're never returning a Casted node
* Add order to BindParams in the ToSql collectorSean Griffin2014-11-171-0/+1
| | | | | | | | | | | | This removes the need for us to do the re-ordering by walking the AST in ActiveRecord. We're using a block to communicate with the collector, since the collector needs to be the thing which knows about the index, while the visitor is the thing that needs to know the syntax. The BindParam needs to know about neither of these things, so it's been changed to stop being a subclass of SqlLiteral I could also see an alternative implementation using format strings if for some reason blocks cause a problem.
* {Matches,DoesNotMatch} support the ESCAPE clauseTamir Duberstein2014-09-251-0/+1
|
* No need to check for SelectStatement as it's a descendant of NodeJiri Pospisil2014-06-121-1/+1
|
* Make sure Arel::SelectManager is not mistaken for an attributeJiri Pospisil2014-06-121-1/+1
|
* Added right and full outer joinsStephen Prater & Fire-Dragon-DoL2014-03-301-0/+2
|
* build quoted nodes in factory methodsAaron Patterson2014-03-241-1/+8
|
* add the casting node to the AST at build timeAaron Patterson2014-03-241-0/+32
| | | | | If we add the casting node to the ast at build time, then we can avoid doing the lookup at visit time.
* Include Predications in GroupingErnie Miller2012-05-191-0/+1
| | | | | | Also, removed unused ordering.rb file, since it is identical to the one being created in unary.rb already, and isn't required anywhere.
* Add #extract, which produces ANSI SQL function EXTRACT(<field> from <expr>).Alexander Staubo2012-02-231-0/+1
|
* Support ANSI SQL2003 window functions.Alexander Staubo2012-02-221-0/+4
|
* Add nodes for boolean constantsDaniel Cadenas2011-08-031-0/+2
| | | | | | | | | | | | This is useful for dynamically created predicates e.g: expr1 = table.create_false expr2 = table.create_false expr1 = create_a_predicate() if some_condition expr2 = create_another_predicate() if some_other_condition table.where(expr1.and(expr2))
* Break Ordering into Ascending/Descending nodes, allow reversalErnie Miller2011-06-151-1/+2
|
* adding Distinct ON nodeAaron Patterson2011-04-211-0/+4
|
* Replace MathOperation with InfixOperation to support more operatorsErnie Miller2011-03-091-1/+1
|
* Merge remote branch 'stiff/master' into omgAaron Patterson2011-03-071-0/+1
|\ | | | | | | | | * stiff/master: implemented support for math operations in numeric attributes
| * implemented support for math operations in numeric attributesVladimir Meremyanin2011-01-291-0/+1
| |
* | Lock should be a unary nodeAaron Patterson2011-02-211-1/+0
|/
* Add support for WITH and UNIONPaul Sadauskas2011-01-211-0/+1
| | | | | | PostgreSQL WITH RECURSIVE support Make WITH be a unary node
* Added Arel::Nodes::NamedFunction for representing generic SQL functionsAaron Patterson2011-01-041-0/+1
|
* cleaning up more nodesAaron Patterson2010-12-141-18/+22
|
* cleaning up more nodesAaron Patterson2010-12-141-7/+3
|
* cleaning up more nodesAaron Patterson2010-12-141-5/+3
|
* removing more nodes!Aaron Patterson2010-12-141-10/+1
|
* adding a join source nodeAaron Patterson2010-12-141-0/+1
|
* adding unary nodeAaron Patterson2010-11-291-0/+1
|
* adding an AS nodeAaron Patterson2010-11-231-0/+1
|
* adding a "not" factory method for creating Not nodesAaron Patterson2010-11-231-0/+1
|
* Support Attribute#asc and Attribute#desc to create orderingsErnie Miller2010-09-291-0/+1
|
* Add support for remaining *_any/*_all attribute methods, and add ↵Ernie Miller2010-09-291-0/+3
| | | | matches/does_not_match/not_in
* adding an oracle visitorAaron Patterson2010-09-241-0/+1
|
* supporting ranges for IN statementsAaron Patterson2010-09-201-0/+2
|
* adding a grouping nodeAaron Patterson2010-09-151-0/+2
|
* adding an EXISTS node, update method will generate an IN clauseAaron Patterson2010-09-141-0/+1
|
* Add Min node.Emilio Tagua2010-09-111-0/+1
|
* adding not equal node, column names are expected to be symbolsAaron Patterson2010-09-101-0/+1
|
* differentiating equality and assignmentAaron Patterson2010-09-101-0/+1
|
* added a greater than nodeAaron Patterson2010-09-101-0/+1
|