aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | | | Arel: rubocop -aMatthew Draper2018-02-24143-3077/+3179
| | | | | | | | | | | |
| * | | | | | | | | | | Merge Arel into Active RecordMatthew Draper2018-02-24146-4/+11277
| |\ \ \ \ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ \ \ \ Merge pull request #516 from yahonda/ruby250Rafael França2018-01-253-1/+6
| | |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | CI with Ruby 2.5.0
| | | * | | | | | | | | | | BigDecimal.new is deprecated in Ruby 2.5Yasuo Honda2018-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refer https://github.com/ruby/bigdecimal/pull/86
| | | * | | | | | | | | | | require 'date' to address for Ruby 2.5Yasuo Honda2018-01-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Address #517
| | | * | | | | | | | | | | Use the latest RubyGems 2.7.4 or higherYasuo Honda2018-01-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refer https://github.com/rubygems/rubygems/issues/2123
| | | * | | | | | | | | | | CI with Ruby 2.5.0Yasuo Honda2018-01-061-0/+1
| | |/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://www.ruby-lang.org/en/news/2017/12/25/ruby-2-5-0-released/
| | * | | | | | | | | | | Merge pull request #481 from lautis/lateralAaron Patterson2017-12-286-1/+40
| | |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lateral expressions for PostgreSQL
| | | * | | | | | | | | | | PostgreSQL lateral expressionsVille Lautanala2017-04-255-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for PostgreSQL lateral expressions. This is treated as an unary function applied to a query expression. Lateral is a separate function to provide interoperability with aliases and unions. These are also separate node types that wrap SelectStatements. The lateral option would need to be implemented in these nodes separately if lateral was an option of SelectStatement. When building the query, an alias can be given as an argument. This enables building a lateral query with an table alias without using either Nodes::TableAlias or Nodes::Lateral directly.
| | | * | | | | | | | | | | Fix link to SQL-92 grammarVille Lautanala2017-04-251-1/+1
| | | | | | | | | | | | | |
| | * | | | | | | | | | | | Merge pull request #513 from itsNikolay/remove_unused_requiresAaron Patterson2017-12-2811-17/+1
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove Unused `require`
| | | * | | | | | | | | | | | Remove Unused `require`Nikolay Ponomarev2017-12-2711-17/+1
| | |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It looks like they are left from old design
| | * | | | | | | | | | | | Merge pull request #512 from itsNikolay/reduce_ReduceAaron Patterson2017-12-275-39/+9
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce `Reduce`
| | | * | | | | | | | | | | | Reduce `Reduce`Nikolay Ponomarev2017-12-275-39/+9
| | |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove `Arel::Visitors::Reduce` because it almost completely duplicates `Arel::Visitors::Visitor`
| | * | | | | | | | | | | | Merge pull request #449 from kbrock/expr_nodeMatthew Draper2017-12-0616-28/+40
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce Expression Node
| | | * | | | | | | | | | | | Delete is not a NodeExpression, change parentKeenan Brock2017-12-051-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires a little cut and paste from the Binary node, but it is used in different parts of sql
| | | * | | | | | | | | | | | Introduce NodeExpression as parent of scalar nodesKeenan Brock2017-12-0515-25/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQL is very powerful. Many nodes can be used as a sub expression or query. grouping all of these possible nodes together
| | * | | | | | | | | | | | | Merge pull request #511 from ecbrodie/patch-1Rafael França2017-12-051-1/+7
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / / / / / | | |/| | | | | | | | | | | | Explicitly mentions the #and operator
| | | * | | | | | | | | | | | Explicitly mentions the #and operatorEvan Brodie2017-12-051-1/+7
| | |/ / / / / / / / / / / /
| | * | | | | | | | | | | | Prepare for 9.0.0Rafael Mendonça França2017-11-142-1/+7
| | | | | | | | | | | | | |
| | * | | | | | | | | | | | Merge pull request #501 from abelards/patch-1Rafael França2017-11-141-1/+4
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Better titles
| | | * | | | | | | | | | | | Update README.mdSylvain Abélard2017-10-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * s/crazy/advanced/ to avoid ableist words * last sections didn't have titles to separate topics I have written a bit more examples of "less trivial" Arel code here, perhaps we can add some of that here: https://github.com/rstacruz/cheatsheets/pull/92/files
| | * | | | | | | | | | | | | Merge pull request #502 from kddeisz/count-mathRafael França2017-10-312-0/+11
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / / / / / | | |/| | | | | | | | | | | | Allow count nodes to have math functions
| | | * | | | | | | | | | | | Allow count nodes to have math functionsKevin Deisz2017-10-272-0/+11
| | |/ / / / / / / / / / / /
| | * | | | | | | | | | | | Merge pull request #500 from ↵Sean Griffin2017-10-062-1/+13
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | jcoleman/fix_incorrect_typecasting_of_raw_sql_strings Type-castable attributes should not try to cast SqlLiteral nodes
| | | * | | | | | | | | | | | Type-castable attributes should not try to cast SqlLiteral nodesJames Coleman2017-09-292-1/+13
| | |/ / / / / / / / / / / /
| | * | | | | | | | | | | | Merge pull request #496 from amatsuda/froms_to_nowhereAkira Matsuda2017-09-241-2/+0
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unused variable
| | | * | | | | | | | | | | | Unused variablesAkira Matsuda2017-09-011-2/+0
| | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | Merge pull request #499 from jgraichen/jg/cte-bindparamsSean Griffin2017-09-211-1/+2
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support BindParams in subqueries
| | | * | | | | | | | | | | | | Support BindParams in subqueriesJan Graichen2017-09-191-1/+2
| | |/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an Arel AST contains a SelectManager as a component, e.g. as a CTE expression, the SelectManager is converted to SQL with `#to_sql`. This uses a new collector that leads to invalid expressions when using bind parameters. For example, when generating PostgreSQL queries, the bind parameter number starts from one again. When using the SubstituteBinds collector, binds in the subquery are not substituted. This commit changes the ToSql visitor to visit the SelectManager ast itself.
| | * | | | | | | | | | | | | Merge pull request #498 from yhirano55/update_travisSean Griffin2017-09-151-3/+3
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / / / / / | | |/| | | | | | | | | | | | Update .travis.yml
| | | * | | | | | | | | | | | Update .travis.ymlYoshiyuki Hirano2017-09-151-3/+3
| | |/ / / / / / / / / / / /
| | * | | | | | | | | | | | Merge pull request #495 from koic/add_required_ruby_version_to_gemspecRafael França2017-08-143-10/+7
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add required_ruby_version to gemspec
| | | * | | | | | | | | | | | Update travis.ymlKoichi ITO2017-08-141-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | travis.yml made it follow Rails (AR). The summary is as follows. - Drop MRI 2.2.1 or lower and updated with latest MRI versions - Drop rbx-2. This build has failed since before - Update JRuby version to 9.1.12.0
| | | * | | | | | | | | | | | Add required_ruby_version to gemspecKoichi ITO2017-08-142-0/+2
| | |/ / / / / / / / / / / /
| | * | | | | | | | | | | | Merge pull request #494 from koic/remove_encoding_utf8_magic_commentMatthew Draper2017-08-103-3/+0
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove encoding utf-8 magic comment
| | | * | | | | | | | | | | | Remove encoding utf-8 magic commentKoichi ITO2017-08-093-3/+0
| | |/ / / / / / / / / / / /
| | * | | | | | | | | | | | Merge pull request #493 from gaurish/patch-1Sean Griffin2017-07-291-1/+0
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove Unused variable - offset_bind
| | | * | | | | | | | | | | | Remove Unused variable - offset_bindGaurish Sharma2017-07-291-1/+0
| | |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes warning in Rails tests: ``` /home/travis/build/rails/rails/vendor/bundle/ruby/2.4.0/bundler/gems/arel-b9ca36f09d5e/lib/arel/visitors/oracle.rb:32: warning: assigned but unused variable - offset_bind ``
| | * | | | | | | | | | | | Merge pull request #492 from mikaji/ci_against_2.4.1Sean Griffin2017-07-271-1/+1
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CI against ruby 2.4.1
| | | * | | | | | | | | | | | CI against 2.4.1Koji Mikami2017-07-271-1/+1
| | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | Merge pull request #491 from yahonda/follow_up_add_bind_for_oracle_visitorSean Griffin2017-07-272-4/+5
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / / / / / | | |/| | | | | | | | | | | | Oracle visitor needs two more `add_bind` argument fix
| | | * | | | | | | | | | | | Address `undefined method `value_for_database'` in Oracle visitorYasuo Honda2017-07-252-4/+5
| | |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here `offset` is bound twice. It used to be `:b1` appeared twice. This commit changes the second `offset` name changed from `:b1` to `:b3` which should not affect the actual bind values for offset.
| | * | | | | | | | | | | | Change the verison to 9.0.0.alphaSean Griffin2017-07-252-2/+2
| | | | | | | | | | | | | |
| | * | | | | | | | | | | | Merge pull request #490 from MaxLap/fix_nodes_hash_eql_eqeqSean Griffin2017-07-258-1/+56
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing hash, eql?, == to various node classes
| | | * | | | | | | | | | | | Add missing hash, eql?, == to various node classesMaxime Lapointe2017-07-258-1/+56
| | |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the nodes classes are missing either one or many of the common comparison methods #hash, #eql? and #==. This makes comparision and working with the ast sometimes painful, as equality or operations likes array differences (which uses a hash behind the scene) produces unexpected results. A test has been added that ensures that every descendants of Node: * have all 3 methods * that all 3 methods were defined from the same class * that the class defining all 3 is also a descendant of Node, to avoid the default ones that rely on identity only
| | * | | | | | | | | | | | Merge pull request #489 from kamipo/remove_unused_bind_valuesSean Griffin2017-07-252-11/+1
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unused `bind_values`
| | | * | | | | | | | | | | | Remove unused `bind_values`Ryuta Kamizono2017-07-252-11/+1
| | |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since https://github.com/rails/rails/commit/213796f, `bind_values` is no longer used from Active Record.
| | * | | | | | | | | | | | Fix test failuresSean Griffin2017-07-247-14/+14
| | | | | | | | | | | | | |
| | * | | | | | | | | | | | Adjust `BindParam` as needed for ARSean Griffin2017-07-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need `value` to have a writer for `StatementCache` to work when prepared statements are disabled. This is something I'd like to revert eventually, either by disabling that form of caching in that case or re-introducing something like the old `Bind` collector. The addition of `nil?` is to make `IS NULL` be inserted correctly, similar to what we already do with quoted and casted nodes